Remove all network printers from a workstation

The script allows you to delete all network printers on a workstation / server.

Adaptation of the script

Delete all printers :

On line 17

Search : lcase(Left(objPrinter.Name,3)) = “\\1”

Replace by : lcase(Left(objPrinter.Name,2)) = “\\”

Remove mapped printers from a specific server :

À la ligne 17

Search : lcase(Left(objPrinter.Name,3)) = “\\1”

Replace by : lcase(Left(objPrinter.Name,9)) = “\\srv-imp”

9 : matches the number of characters in \\srv-imp




Leave a Comment