Use PowerShell to view pending print jobs

Using the Get-Printer cmdlet as follows indicates that one of the printers on HOST7 has Error for its status:

PS C:\> Get-Printer -ComputerName HOST7 | where PrinterStatus -eq Error | `
fl Name,JobCount

: HP LaserJet 5200 PCL6
JobCount : 3

To view more information about the cause of this error, you can use the Get-PrintJob cmdlet like this:

PS C:\> Get-PrintJob -ComputerName HOST7 -PrinterName “HP LaserJet 5200 PCL6”

Id   ComputerName   PrinterName     DocumentName   SubmittedTime       
   ————   ———–     ————   ————-       
3    HOST7          HP LaserJet … Document 3    
8/26/2012 2:08:06 PM Error, Print…
4    HOST7          HP LaserJet … Document 2    
8/26/2012 2:08:06 PM Normal
5    HOST7          HP LaserJet … Document 1     8/26/2012 2:08:06 PM Normal

The first print job in the queue (job #3) is generating the error condition. You can find out more information about this job as follows:

PS C:\> Get-PrintJob -ComputerName HOST7 -PrinterName “HP LaserJet 5200 PCL6” | `
where Id -eq 3 | fl JobStatus,UserName

JobStatus : Error, Printing, Retained
UserName  : kberg

The fact that the job status includes Retained suggests that either the print job is corrupted or the print device is offline or out of paper. Either way, user Karen Berg should probably be informed because the print job belongs to her. 

The above tip was excerpted from Mitch Tulloch’s book Training Guide: Installing and Configuring Windows Server 2012 from Microsoft Press.

Mitch is a nine-time recipient of the Microsoft Most Valuable Professional (MVP) award and a widely recognized expert on Windows administration, deployment and virtualization.  For more information see

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top