?
Solved

Script to remove certain printers

Posted on 2014-12-02
5
Medium Priority
?
108 Views
Last Modified: 2014-12-04
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
0
Comment
Question by:IATA-techops
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 7

Expert Comment

by:valmatic
ID: 40476189
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...
0
 

Author Comment

by:IATA-techops
ID: 40477110
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”
0
 

Author Comment

by:IATA-techops
ID: 40478356
?
0
 
LVL 7

Accepted Solution

by:
valmatic earned 1000 total points
ID: 40480480
a local machine is a little different like so...
http://community.spiceworks.com/scripts/show/1612-delete-one-local-printer
0
 

Author Closing Comment

by:IATA-techops
ID: 40480868
n/a
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question