Restart Print Spooler + Optional Queue Clear
Restarts Print Spooler and optionally clears stuck jobs.
Script Actions
Script Actions
Credibility
Last reviewed
Jul 8, 2026
Last tested
Jun 1, 2026
PowerShell
Windows PowerShell 5.1
Safety score
67/100
Documentation
100/100
Community rating
Coming soon
Downloads
Coming soon
Review status
approved
Verified by OperatorOS
Review
OperatorOS verified
Catalog
Official library
Safety
Static scan completed
Restart Print Spooler + Optional Queue Clear is part of the official OperatorOS ScriptForge catalog. It has been reviewed for metadata completeness, safety scan results, PowerShell compatibility, and technician-facing documentation.
Script Body
# OperatorOS ScriptForge imported Xodus library script
# Workbook ref: SCR-016
# Title: Restart Print Spooler + Optional Queue Clear
# Category: Printing / Peripheral
# Ready state: Ready
# Workbook risk: medium
# Body type: PowerShell / Command Block
pa
$OperatorOSFrameworkCandidates = @(
(Join-Path -Path $PSScriptRoot -ChildPath '..\..\..\framework\OperatorOS-ScriptFramework.psm1'),
(Join-Path -Path $PSScriptRoot -ChildPath '..\..\..\..\framework\OperatorOS-ScriptFramework.psm1')
)
$OperatorOSFrameworkPath = $OperatorOSFrameworkCandidates | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
if ($OperatorOSFrameworkPath) {
Import-Module $OperatorOSFrameworkPath -Force
}
$ErrorActionPreference = 'Stop'
ram([switch]$ClearQueue)
Stop-Service Spooler -Force -ErrorAction SilentlyContinue
if ($ClearQueue) {
Remove-Item "$env:SystemRoot\System32\spool\PRINTERS\*" -Force -Recurse -ErrorAction SilentlyContinue
}
Start-Service Spooler
Get-Service Spooler | Format-List Name,Status,StartType
Requirements
- Windows PowerShell 5.1 or newer for Windows Endpoint.
- Required tooling: PowerShell.
- Recommended run context: Elevated PowerShell/RMM.
Parameters
ClearQueue
boolean / optional
Workbook input carried forward from: $ClearQueue
Examples
Run script
Runs the imported OperatorOS script after reviewing parameters and placeholders.
./printing-peripheral-restart-print-spooler-optional-queue-clear.ps1Changelog
1.0.0 - Imported from Xodus / OperatorOS Script Library workbook with OperatorOS metadata, redaction notes, and framework bootstrap.