How to stop a windows service using PowerShell?

To stop specific service using PowerShell, you need to use Stop-Service command.


Stop-Service -Name ServiceName
Stop-Service -DisplayName ServiceDisplayName


Stop-Service -Name Spooler

To check if service is stopped, type Get-Service -Name Spooler.


Status   Name           DisplayName
------   ----           -----------
Stopped  Spooler           Print Spooler

You can also use -Verbose parameter to check the command processes.

PS C:\Windows\system32> Stop-Service -Name spooler -Verbose
VERBOSE: Performing the operation "Stop-Service" on target "Print Spooler (spooler)".

You can also perform the stop the service using,

Get-Service -Name Spooler | Stop-Service -Verbose

You can also use the wildcard character (*) to recognize the service and stop it.

For Example,

Stop-Service -Name Spoo* -Verbose

Here, service name starts with “spoo” will be stopped, if there are multiple services starting with spoo, all will be stopped.

Updated on: 22-Jan-2020

18K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started