A stuck print job can prevent other documents from printing. You can use PowerShell to review and clear the queue for a single printer or for every installed printer.
Although you can use a printer’s app to manage the print queue, powershell commands offer a quicker and simpler method to manage the printer from within the powershell window.
Before you begin: Open PowerShell as an administrator if you need permission to remove jobs submitted by other users. Right-click the Start button and select Terminal (Admin) or Windows PowerShell (Admin). Running Powershell without administrator rights may result the commands failure.
Clear the Queue for One Printer
1. Find the printer name
Get-Printer | Select-Object Name, PrinterStatus
Copy the name of the printer whose queue you want to clear.
2. Show the print queue
Replace HP Office Printer with the name from the previous command:
Get-PrintJob -PrinterName "HP Office Printer"
3. Remove all jobs from the queue
Get-PrintJob -PrinterName "HP Office Printer" |
Remove-PrintJob
4. Verify that the queue is clear
Get-PrintJob -PrinterName "HP Office Printer"
If no jobs are listed, the queue is clear.
Clear the Queues for All Installed Printers
The following command removes all queued print jobs from every installed printer:
Get-Printer | ForEach-Object {
Get-PrintJob -PrinterName $_.Name | Remove-PrintJob
}
To verify the queues afterward, run:
Get-Printer | ForEach-Object {
Get-PrintJob -PrinterName $_.Name
}
Note: Pages already received by the printer may still print after the queue is cleared.
Final Thoughts
Clearing the queue with PowerShell is quick and avoids the need to dig through Settings or restart the Print Spooler service. If jobs still refuse to clear, restarting the spooler is the next step to try.
Simplifying technology, one step at a time.