Delete Specific Printers

Deletes all HP QuietJet printers installed on a computer.

 
 
 
 
 
5 Star
(1)
Add to favorites
Printing
8/10/2009
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Brillant Can the script be changed to ..
    2 Posts | Last post September 26, 2012
    • I'd like to remove the printer based ont eh server it's connecting to
      Can I do that
      
      ("Select * from Win32_Printer Where ServerName = '\\print01'")
      
      ? is that possible
    • strComputer = "." 
      Set objWMIService = GetObject("winmgmts:" _ 
          & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") 
       
      Set colInstalledPrinters =  objWMIService.ExecQuery _ 
          ("Select * from Win32_Printer Where ServerName like '%printservername%'") 
       
      For Each objPrinter in colInstalledPrinters 
          objPrinter.Delete_ 
      Next