Restart-Service
noun
say it: “REE-start SUR-vis” /riˈstɑrt ˈsɝvɪs/
A PowerShell command that stops a Windows service and starts it again, run in an administrator window.
What does Restart-Service do?
Restart-Service turns a stuck service off and on again: the Print Spooler when documents won't leave the queue, say. It changes the computer, so it runs in a window opened as administrator; rehearse it first with -WhatIf, which changes nothing. It prints nothing when it works.
Restart-Service -Name Spooler -WhatIf
# What if: Performing the operation "Restart-Service" on target "Print Spooler (Spooler)".
Restart-Service -Name Spooler # in an administrator window
In a sentence
- “Sam rehearsed Restart-Service with -WhatIf before running it as administrator.”
- “One Restart-Service for the Print Spooler and the stuck queue started moving.”
Level: Journeyman · More PowerShell terms at this level
Updated