Clear a Stuck Print Queue with PowerShell
Delete stuck print jobs and restart the print spooler instead of rebooting the whole PC.
01Command
$ Get-PrintJob -PrinterName "HP LaserJet" | Remove-PrintJob
Restart-Service -Name Spooler02What it does
A single corrupt job can wedge the whole queue: every new document stacks up behind it, and the "Cancel" button in Settings does nothing. Get-PrintJob lists pending jobs on a named printer, and piping to Remove-PrintJob deletes them all in one go — much faster than deleting one at a time in the UI. If jobs vanish but the printer stays frozen, restart the Spooler service, which is exactly what the old advice of deleting files in C:\Windows\System32\spool\PRINTERS achieves, safely. If you are unsure of the printer's exact name, run Get-Printer first to list it.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-PrintJobEvidence: Documents Get-PrintJob -PrinterName for listing jobs on a specific printer queue.
- Remove-PrintJobEvidence: Documents Remove-PrintJob for deleting print jobs, accepting pipeline input from Get-PrintJob.
Last verified: 2026-09-18 · Category: System & Settings
06Related solutions
Search inside text files and logs with regex, returning file, line number and match.
Create or update a .zip from any files or folder contents straight from PowerShell.
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.