Tip: Sometimes you need to restart the print spooler (workstation or server) to solve some issues.
Examples: job stuck, unable to cancel a job, printer not responding, etc.
To restart the print spooler service with PowerShell (as adminstrator):
1 2 3 4 5 6 |
# Local computer Restart-Service -Name Spooler -Force # Remote computer Restart-Service -InputObject $(Get-Service -ComputerName $computer -Name spooler) -Force Invoke-Command -ComputerName $computer {Restart-Service -Name Spooler -Force} |
Sometimes, restarting the print spooler service is not enough and you need to clean the print spooler queue.
You can delete the files or just move them into another folder.
1 2 3 4 5 6 7 8 9 |
Stop-Service -Name Spooler -Force # To backup the files Move-Item -Path "$env:SystemRoot\System32\spool\PRINTERS\*.*" -Destination 'C:\demo\new' -Force # To delete the files Remove-Item -Path "$env:SystemRoot\System32\spool\PRINTERS\*.*" Start-Service -Name Spooler |