Skip to content

Instantly share code, notes, and snippets.

@pcrockett-pathway
Created February 18, 2019 10:43
Show Gist options
  • Select an option

  • Save pcrockett-pathway/83a3bf09ef26c586b91909ebf9759fea to your computer and use it in GitHub Desktop.

Select an option

Save pcrockett-pathway/83a3bf09ef26c586b91909ebf9759fea to your computer and use it in GitHub Desktop.
Reset print spool service when your printer queue gets stuck
#Requires -RunAsAdministrator
[CmdletBinding()]
param()
$ErrorActionPreference = "Stop"
Set-StrictMode -Version 5.0
# From https://help.logmein.com/articles/en_US/FAQ/How-do-I-clear-the-print-queue-if-a-document-is-stuck-en1
Stop-Service Spooler
$spoolContents = Join-Path $env:windir "System32\spool\PRINTERS\*"
Remove-Item $spoolContents
Start-Service Spooler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment