Print Job Stuck in Queue on Windows Server 2016/2012R2/2008R2
This tutorial will show you how to manually clear out a job stuck in the print queue on Windows Server 2016/2012R2/2008R2 network print server. The first thing to try is obviously restarting the printer/computer. You can also try right clicking on the job in the queue and selecting delete/cancel. If those things don’t work, then follow the directions below.
Before moving on, make sure that the Pause Printing and Use Printer Offline options are not enabled in the Windows print queue management menu. Disable these options.
Windows Server: Clear out Stuck Print Job
- Browse to C:\Windows\System32\spool\PRINTERS
There are two corresponding files for each print job, a .SPL file and a .SHD file that you will want to locate.
What kind of files are these? The Windows Print Service (Print Spooler) creates two files in the %systemroot%\System32\spool\PRINTERS directory when printing any document: one with the .SHD extension (contains the settings for the print job), the second is .SPL file (contains the data that needs to be printed). After successful printing, these files are automatically deleted both from this directory and from the print queue.
- I usually open up the .SPL files with notepad and browse to find the correct print job. They normally list the username of person who printed and the printer model. The files don’t look pretty, but with some CTRL+F you should be able to locate the specific document that is stuck in the queue.
- Now go to the Start Menu > Administrative tools and launch the Services console (services.msc).
- Right click on “Print Spooler” and stop it. If you don’t stop it, you will get errors in Step 5.
- Delete the .SPL file and .SHD file corresponding to the stuck document in Step 1.
- Now start the print spooler service back up by right clicking on it and selecting “Start.”
- Refresh the window on the print queue and it should now be gone!
Reset and Clear Print Spooler in Windows Server without Reboot
If this method did not help you, you can completely clear the print queue on the server, but all (!!!) print jobs in the queues of all printers will be deleted.
To do this, open an elevated command prompt and, run the following commands in turn:
net stop spooler del %systemroot%\system32\spool\printers\*.shd /F /S /Q del %systemroot%\system32\spool\printers\*.spl /F /S /Q net start spooler
If you prefer PowerShell, you can clear the print queue with this script:
Get-Service *spool* | Stop-Service -Force -Verbose Start-Sleep -Seconds 10 $path = $env:SystemRoot + ”\system32\spool\printers\” Get-ChildItem $path -File | Remove-Item -Force -Verbose Get-Service Spooler | Start-Service -Verbose
If old documents are accumulating in your print queues, you can periodically delete them from the queue. For example, the following script deletes all documents older than 2 days from print queues:
Get-Printer | get-printjob | where{$_.SubmittedTime -lt ((Get-Date).adddays(-2))} | Remove-PrintJob
If the printer doesn’t print after clearing the print queue, try the following options:
- Try to disable the Enable bidirectional support option in the printer settings (on the Ports tab);
- Recreate the print port of your network printer in the console section Print Management > Ports.
- Make sure you are not using WSD ports for printing. In Windows Server 2012R2, when you install a new network printer, a WSD port is created by default. When using this port type, the “ghosts” of completed tasks remain in the Spooler folder. They can be easily removed manually from the Spooler folder (the Print Spooler service doesn’t lock them); However, they continue to appear in the printer queue window. Change the port type from WSD to Standard TCP/IP Port.
- Enable the SNMP Status Enabled option in the printer port settings;
- Try to enable driver isolation mode for problematic printer drivers. Select print driver > right click > Set Driver Isolation > Isolated.
If you work in a small business environment and do this quick, you can locate/delete the files + stop/restart the print spooler without any downtime. Another way people have fixed a job stuck in the queue is by setting the driver in isolation mode. That is another article. This is simply a quick way to clear out the queue.