Presuming you don't need infinite detail:
Set WMICompSystem = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colLocal = WMICompSystem.ExecQuery _
("Select * from Win32_Printer Where Local = 'True'")
Set colNetwork = WMICompSystem.ExecQuery _
("Select * from Win32_Printer Where Network = 'True'")
Regards,
Michael B. Smith, MCITP:SA,EMA/MCSE/Exchange MVP
My blog: http://TheEssentialExchange.com/blogs/michael
Link with me at: http://www.linkedin.com/in/theessentialexchange
From: Joseph L. Casale [mailto:[EMAIL PROTECTED]
Sent: Monday, September 15, 2008 1:54 PM
To: NT System Admin Issues
Subject: Printer Logon Scripts
I need to drop all but a few printers, then add my own new ones.
Anyone know how to enumerate all the installed printers, and then I could
loop those except the few I want to go through the RemovePrinterConnection
Method.
Thanks,
jlc
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~