Script to remove certain printers

IATA-techops
IATA-techops used Ask the Experts™
on
Dear Experts,

I have tried using scripts so that a user can run to automatically remove certain printers.

Our current installed printers are IP printers and they all start with the same 3 letter code but the 4th character changes.

Is there a script that can be executed in order to remove a printer or printers?

Thank you in advance
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
here you go
https://www.interworks.com/blogs/smatlock/2014/03/31/using-logon-scripts-add-and-remove-network-printers

Just because this site calls it a logon script does not mean it can't be used in general it certainly can be run manually etc...

Author

Commented:
Still unable to run it

From this code: I only want to remove printers from a local machine.

I have removed the Add printer part and added my server name, however receive a character error.

My server name is mia-fs2     and the printer is mia-61, could you tell me where i should enter this info correctly so the script can execute?

 set objNetwork = CreateObject(“WScript.Network”)
objNetwork.RemovePrinterConnection “\\Your_print_server\printer_name_being_removed”
objNetwork.AddWindowsPrinterConnection “\\Your_print_server\printer_name_being_added”

Author

Commented:
?
Commented:
a local machine is a little different like so...
http://community.spiceworks.com/scripts/show/1612-delete-one-local-printer

Author

Commented:
n/a

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial