• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 769
  • Last Modified:

Delete Multiple Network Printers via registry or batch file

Hi,

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

Thanks.
0
sd735
Asked:
sd735
1 Solution
 
Pramod BugudaiCommented:
0
 
sd735Author Commented:
I need a file because there are multiple print servers.  I only want to remove printers from the Pluto server.
0
 
canadianitCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now