iowahawkeye
MIS
Hi,
We are retiring our old workhorse print server and I need to delete the printers from each user’s profile on the PC desktops.
I have a vb script that will delete all printers from the profile logged in but I want to clear from all profiles on PC.
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * From Win32_Printer Where Network = True")
For Each objPrinter in colInstalledPrinters
objPrinter.Delete_
Next
Any help would be great,
Iowahawkeye
We are retiring our old workhorse print server and I need to delete the printers from each user’s profile on the PC desktops.
I have a vb script that will delete all printers from the profile logged in but I want to clear from all profiles on PC.
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * From Win32_Printer Where Network = True")
For Each objPrinter in colInstalledPrinters
objPrinter.Delete_
Next
Any help would be great,
Iowahawkeye