Powershell Tip #40: Restart print spooler service

By | September 9, 2015

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):

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.


3 thoughts on “Powershell Tip #40: Restart print spooler service

  1. Pingback: Powershell Tip #39: Easier way to define parameter attributes | Powershell Guru

  2. Pingback: Powershell Tip #41: DefaultParameterSetName of the CmdletBinding attribute | Powershell Guru

  3. Aaron

    PS C:\Windows\system32> Restart-Service -InputObject $(Get-Service -ComputerName phyl4143.polyclinic.pri -Name spooler) -Force
    Invoke-Command -ComputerName phyl4143.polyclinic.pri {Restart-Service -Name Spooler -Force}
    [phyl4143.polyclinic.pri] Connecting to remote server failed with the following error message : The WinRM client cannot complete the operation within the time specified. Check if the machine name is valid and is reachable over the network and firewall excepti
    on for Windows Remote Management service is enabled. For more information, see the about_Remote_Troubleshooting Help topic.
    + CategoryInfo : OpenError: (:) [], PSRemotingTransportException
    + FullyQualifiedErrorId : PSSessionStateBroken

    Im not quite sure what to do with this info, wrm is enabled.


Leave a Reply

Your email address will not be published.