Deploy printers by using Group Policy
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Vista
Print Management (Printmanagement.msc) can be used with Group Policy to automatically add printer connections to a computer's Printers and Faxes folder.
To do this, you use the Deploy with Group Policy dialog box to automatically add a printer connection setting to an existing Group Policy object (GPO) in Active Directory. When Group Policy processing runs on client computers, the printer connection settings are applied to the users or computers associated with the GPO. This is called deploying printer connections. Printers you deploy by using this method appear in the Deployed Printers object of Print Management tree when the print server they are connected to is being monitored.
This method of installing a printer is useful in a laboratory, classroom, or branch office setting where every computer in the room or office needs access to the same printer. It is also useful in large organizations, where computers and printers are often separated by function, workgroup, or department, such as marketing or human resources.
A printer connection that has been installed by using a per-user connection is available to the user no matter what computer the user logs on to in the network. A printer connection that has been installed by using a per-machine connection appears in the Printers and Faxes folder, ready for use by any user of that computer.
Only per-user printer connections are supported on computers running Windows 2000. Per-machine printer connections are supported on computers running Windows XP or later.
To deploy printer connections using Group Policy, add the PushPrinterConnections.exe utility to a machine startup script (for per-machine connections) or to a user logon script (for per-user connections). The utility reads the printer connection settings made in the GPO and adds the printer connection.
In order for the PushPrinterConnections.exe utility to work, you must update your Active Directory schema with the Windows Server 2003 R2 changes. For more information about these schema updates, see the Microsoft Web site (http://go.microsoft.com/fwlink?linkid=51166).
Once you deploy printer connection settings to a GPO, the PushPrinterConnections.exe utility will run on the client computers upon logon or restart. The utility reads the settings from the GPO and adds the deployed printer connections to the users or computers to which the GPO applies. You can reuse the GPO used to deploy per-user or per-machine printer connections. For more information about Group Policy and Printers, see Set Group Policy for Printers on the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkId=50998).
It is a good idea to use the same GPO for deploying the printer connection settings and the PushPrinterConnections.exe computer startup or user logon script. This ensures that only users (or computers) that receive the printer connection settings will run the PushPrinterConnections.exe utility.
The print server role must be installed and you must be a member of the Administrators group to perform these procedures. You must also have write access to the Group Policy object to use it to manage printers. Before you install printers by using Group Policy, you must have a GPO for your printer connections settings that is assigned to the appropriate users and computers. You can use the Group Policy Object Editor or Active Directory Users and Computers to create a GPO.
For more information about using Group Policy, see Enterprise Management with the Group Policy Management Console on the Microsoft Web site (http://go.microsoft.com/fwlink?linkid=22814).
To install printers to groups of users or computers by using Group Policy
Open the Administrative Tools folder, and then double-click Print Management.
In the Print Management tree, under the appropriate print server, click Printers.
In the results pane, right-click the printer you want to deploy, and then click Deploy with Group Policy.
In the Deploy with Group Policy dialog box, click Browse, and then choose a Group Policy object.
To assign the printer connection setting to the GPO, do one or both of the following:
As a per-user setting, select the The users that this GPO applies to (per user) check box.
As a per-machine setting, select the The computers that this GPO applies to (per machine) check box.
Repeat steps 3 to 6 to add the printer connection setting to another GPO.
To use the PushPrinterConnections.exe file
Using Group Policy Management console (gpmc.msc), right-click the GPO with your printer connections settings, and then click Edit.
In the Group Policy Object Editor tree, navigate to one following locations:
If the printer connections are deployed per-machine, go to Computer Configuration, Windows Settings, Scripts (Startup/Shutdown).
If the printer connections are deployed per-user, go to User Configuration, Windows Settings, Scripts (Logon/Logoff).
Right-click Startup or Logon, and then click Properties.
In the Logon Properties or Startup Properties dialog box, click Show Files.
Copy the PushPrinterConnections.exe file to this location and then close the window.
In the Logon Properties or Startup Properties dialog box, click Add.
Type PushPrinterConnections.exe in the Script Name box.
If you want to enable logging, type –log in the Script Parameters box. Log files are written to %windir%\temp\ppcMachine.log (for per-computer connections) and %temp%\ppcUser.log (for per-user connections) on the computer on which the policy is applied.
For per-computer connections, the printer connections will be added when the client computer restarts. For per-user connections, the printer connections will be added when the user logs on. If you remove the printer connection settings from the GPO, PushPrinterConnections.exe will remove the corresponding printers from the client computer on the next restart or user logon.