Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Monitor Print Queue TimesContent of Monitor Print Queue Times.vbsMD5 Hash: 421C29866CB6B7402F72AD601756D154 |
||
' Description: Identifies any print jobs that have been in the print queue for more than 15 minutes.
Const USE_LOCAL_TIME = True Set DateTime = CreateObject("WbemScripting.SWbemDateTime") strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colInstalledPrinters = objWMIService.ExecQuery _ ("Select * from Win32_PrintJob") Wscript.Echo "Print Queue, Job ID, TimeSubmitted, Total Pages" For Each objPrinter in colInstalledPrinters DateTime.Value = objPrinter.TimeSubmitted dtmActualTime = DateTime.GetVarDate(USE_LOCAL_TIME) TimeinQueue = DateDiff("n", actualTime, Now) If TimeinQueue > 15 Then strPrinterName = Split(objPrinter.Name,",",-1,1) Wscript.Echo strPrinterName(0) & ", " _ & objPrinter.JobID & ", " & dtmActualTime & ", " & _ objPrinter.TotalPages End If Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |