Changes

Printer configuration

616 bytes added, 12:01, 15 March 2011
Added a section on removing (local) printers.
 
= Removing Printers =
 
Sometimes it is nice to clean out old printer entries, especially when deploying printer configurations for the first time. A hint from http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/01/how-can-i-remove-all-the-local-printers-from-a-computer.aspx does the tick for you:
 
<source lang="dos">
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
 
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer Where Network = FALSE")
 
For Each objPrinter in colInstalledPrinters
objPrinter.Delete_
Next
</source>
= Adding Printers =
Anonymous user