Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  Print  Queue  Statistics  

 Content of List Print Queue Statistics.vbs
MD5 Hash: D29B24684C829A74DFB7B6DDDAD0F0EE
' Description: Uses cooked performance counters to retrieve data such as total number of jobs printed and total number of printing errors for each print queue on a computer.


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 "Job errors: " & objPrintQueue.JobErrors
Wscript.Echo "Not ready errors: " & objPrintQueue.NotReadyErrors
Wscript.Echo "Out of paper errors: " & objPrintQueue.OutOfPaperErrors
Next

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a