Skip to content

Posts from the ‘Printers… urgh’ Category

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

Adding printers with VBScript


Pretty easy stuff… if you should ever need to add a login script to map a printer, or batch out a very large printer install… even convert to an EXE and push out a printer change to hundreds of systems with System Management Server.. this is a great way to do so!

‘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