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

Romain Drouche
System Architect | MCSE: Core Infrastructure
IT infrastructure expert with over 15 years of field experience. Currently a Systems and Networks Project Manager and Information Systems Security (ISS) expert, I use my expertise to ensure the reliability and security of technological environments.

Leave a Comment