M
MildManoredJanitor
Hello Group
Can anyone tell me what the script below is in VB.NET WMI format?
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer")
For Each objPrinter in colInstalledPrinters
objPrinter.CancelAllJobs()
Next
------------------------------------------
If I try to convert this then I make 'objPrinter' a ManagementObject, but
then I have 'Delete' & not 'CancelAllJobs'.
Any suggestions?
Can anyone tell me what the script below is in VB.NET WMI format?
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer")
For Each objPrinter in colInstalledPrinters
objPrinter.CancelAllJobs()
Next
------------------------------------------
If I try to convert this then I make 'objPrinter' a ManagementObject, but
then I have 'Delete' & not 'CancelAllJobs'.
Any suggestions?