Solved

Delete Multiple Network Printers via registry or batch file

Posted on 2010-08-26
3
745 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
3 Comments
 
LVL 8

Expert Comment

by:Pramod Bugudai
Comment Utility
0
 

Author Comment

by:sd735
Comment Utility
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 500 total points
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now