Tuesday, March 6, 2012

TIPS - Automatic Way of Push Deploy Shared Printers to Workstations Over a Network

If you're a network administrator, one big headache is to deploy shared network printers to tens or even hundreds of workstation computers. In a Windows domain environment, this mission can be easily accomplished by a login script.

To centralize your printers' pool, a good way is to setup a printer server using Windows 2008. Install printers on your Windows Server 2008 and share these printers out. One good way to setup such a printer server is to create it as a Windows 2008 virtual machine, over Hyper-V.

A batch file could be created and put inside your domain's netlogon folder, \\DOMAIN\NETLOGON. The file, maybe named printer.bat; it will look like this:

    rundll32 printui.dll PrintUIEntry /in /n "//printerservername/sharename" /q

The /in switch means to install the share printer.

For example, if your printer's share name is HP 4200 PCL and the server name is HKPR01, the command will look like this:

    rundll32 printui.dll PrintUIEntry /in /n "//hkpr01/HP 4200 PCL" /q

If you have an old printer you'd want to uninstall, this is a command to use:

    rundll32 printui.dll PrintUIEntry /dn /n "\\hkpr01\HP 5si-mx" /q

The /dn switch means to delete the share printer.

Finally, saved this login script file to \\DOMAIN\NETLOGON folder. Then, go to your Active Directory and manager your domain users with the login script applied.

No comments:

Post a Comment