[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Delete Multiple Network Printers via registry or batch file

Posted on 2010-08-26
3
Medium Priority
?
758 Views
Last Modified: 2012-05-10
Hi,

I need a batch file or registry file to delete all network printers that point to the server "pluto"

Thanks.
0
Comment
Question by:sd735
[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 Comments
 
LVL 8

Expert Comment

by:Pramod Bugudai
ID: 33534057
0
 

Author Comment

by:sd735
ID: 33534134
I need a file because there are multiple print servers.  I only want to remove printers from the Pluto server.
0
 
LVL 3

Accepted Solution

by:
canadianit earned 2000 total points
ID: 33534519
I do this regularly with the following:
In my login script I call this

cscript.exe \\tdc\NETLOGON\move3printers.vbs

and in move3printers.vbs I have
on error resume next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colPrinters = objWMIService.ExecQuery("Select * From Win32_Printer")
Set objNetwork = CreateObject("WScript.Network")
WScript.Sleep 2000

'Remove old printers
objNetwork.removePrinterConnection "\\Hebe\HP LaserJet 4300 PCL 6", true, false

'Install current printers
objNetwork.AddWindowsPrinterConnection "\\DC\Black Laser"
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

656 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