Skip to content

Removing Network printers with VBScript


Another easy one for you… if you should ever need to remove network printers that are installed on a machine… this is a great way to do so! batch it out, convert it to an executable.. it’s just a great tool!

‘Start Script

Dim net
Set net = CreateObject(“WScript.Network”)
net.AddWindowsPrinterConnection “
\\Server\PrintShare0

net.AddWindowsPrinterConnection “\\Server\PrintShare1
net.AddWindowsPrinterConnection “
\\Server\PrintShare2
net.AddWindowsPrinterConnection “
\\Server\PrintShare3
net.AddWindowsPrinterConnection “
\\Server\PrintShare4
net.AddWindowsPrinterConnection “
\\Server\PrintShare5
net.SetDefaultPrinter “\\Server\PrintShare3

‘End Script

As always, you must use the visual basic script extention.

Copy the above, paste into a notepad, and save the file as whateveryouwant.vbs

One Comment Post a comment
  1. Kristofer #

    Might there be an error in this script. This is identically the same script as the one for adding the network printers. Do you know a way to remove all previously installed network printers without any information on what printers are installed on a machine?

    Kristofer

    2008/07/02

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: