Windows 2000-based and non-Windows 2000-based computers that have shared printers can publish printers in Active Directory so that the printers can be searched for easily.
Windows 2000-based computersTo publish a printer shared by a computer running Windows 2000, use the Sharing tab in the printer's properties. By default, the List in the Directory check box is selected. This means that the shared printer is published by default. The printer is published in the corresponding computer container in Active Directory. It is named server-printer name.
Changes made to the printer's attributes (location, description, loaded paper, and so forth) are propagted to Active Directory.
To share and publish a Windows 2000-based printer:
- In Windows 2000, click Start, point to Settings, click Printers, and then click Add Printer. Follow the instructions to create the printer.
- After you have created and shared the printer, the Listed in the Directory check box should be selected. The Printer object is published under the Computer object to which it is attached.
Non-Windows 2000-based computersYou can publish printers shared by versions of Windows other than Windows 2000 in Active Directory. If Windows Scripting Host is installed (it is installed by default in Windows 98), the simplest method is to use the Pubprn script. This script publishes all the shared printers on a given server. The script is located in the System folder. The syntax is:
cscript pubprn.vbs servername dspathFor example, the following command publishes all the printers on the Prserv1 server. The printers are published in the Marketing organizational unit (OU):
cscript pubprn.vbs prserv1 "LDAP://ou=marketing,dc=antipodes,dc=com"This script copies only the following subset of the printer's attributes:
- UNC Path
You can add other attributes by using the Active Directory Users and Computers snap-in (Dsa.msc) in Microsoft Management Console (MMC). Note that you can run the Pubprn script a second time to update (rather than overwrite) existing printers.For more information Windows Scripting Host and the installation location, click the following article number to view the article in the Microsoft Knowledge Base:
188135 Description of Windows Script Host (WSH)To use the Active Directory Users and Computers snap-in to publish non-Windows 2000-based printers:
- Click Start, click Run, type dsa.msc, and then click OK.
- Double-click the domain name, right-click the organizational unit, point to New, and then click Printer.
- In the UNC Path box, type the path to the printer (such as \\servername\printername).
Searching for Printers in Active Directory
Active Directory client users can browse for printers published in Active Directory, submit jobs to those printers, and even install the printer drivers directly from the server.
- Click Start point to Search, and then click either For Printers in Windows 2000 or in Windows XP.
- In the In box, click Entire Directory.
- Type the parameters on which you want to search.
- Click Find Now.
- Right-click a printer, and then click Connect to install it. Or, click Open to view the current printer queue.
234270 Using group policies to control printers in Active Directory
ID článku: 234619 - Poslední kontrola: 16. 12. 2009 - Revize: 1