Husband, father, IT dude & blogger wrapped up into one good looking package.
Group Policy VBScript to Replace, Add, Remove and Manage User Printer Queues
Today I’m sharing a script I wrote that helps Windows Administrators manage users’ printer queues. If you haven’t already, please check out my post PowerShell Script to Audit Printer Queue Usage post. This little baby will take a look at a Printer Server’s event log and give you a CSV file showing which printer queues are actually being utilized by users. It may help you to make some decisions when it comes to your printer queues.
The following script is intended to be run as a Group Policy Logon script. It can, of course, be run manually. The script generates output which I like to dump a text file to the users’ home drive in order to determine if the script performed as expected. In order to do this from Group Policy it will need to be accompanied by a batch file to launch it.
AddRemovePrinters.vbs can do the following functions.
REMOVE a Printer
Remove an old queue and REPLACE it with a new queue. (Could be used to help migrate off an old print server)
Remove a specified queue, and RE-ADD the same queue. (Can help fix some issues when updating a queue printer driver.)
Check out the IsTargetedPrinter() function in the script to see how to configure it. The configuration of the script is done in this function.
Note: If you configure a printer queue to be removed and re-added, the user will loose their custom settings on the printer every time the script is run. I use the remove/readd functionality when I’m updating printer drivers. It seems to help the client workstation update the drivers.