|
楼主 |
发表于 2021-3-8 17:15:01
|
显示全部楼层
这是我网上搜索的资料,把下面的代码粘贴到记事本,保存成vbs后缀文件执行就可以取得总的jobs数等信息。
----------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colPrintQueues = objWMIService.ExecQuery _
("Select * from Win32_PerfFormattedData_Spooler_PrintQueue Where Name <> '_Total'")
For Each objPrintQueue in colPrintQueues
Wscript.Echo "Name: " & objPrintQueue.Name
Wscript.Echo "Jobs: " & objPrintQueue.Jobs
Wscript.Echo "Current jobs spooling: " & objPrintQueue.JobsSpooling
Wscript.Echo "Maximum jobs spooling: " & objPrintQueue.MaxJobsSpooling
Wscript.Echo "Total jobs printed: " & objPrintQueue.TotalJobsPrinted
Wscript.Echo "NamJob errors: " & objPrintQueue.JobErrors
Wscript.Echo "Not ready errors: " & objPrintQueue.NotReadyErrors
Wscript.Echo "Out of paper errors: " & objPrintQueue.OutOfPaperErrors
Next
|
|