Tag Archives: stop service

start stop manage services in windows server with powershell

This post is all about how to start stop manage services in windows server with powershell. We will discuss the start service powershell command, stop service powershell command, Killing Windows Service that Hangs on Stopping or Not Responding command, how to get service powershell command, how to set service startup type powershell command.

Get Service powershell command windows server

This command will display all service on computer. Default display will be status, service name, and display name each service

Get-Service

Get service begin with search string

Get service begin with Display services that include search string “sp”

Get-Service "sp*" | Sort-Object status
Get service begin with Display services that include search

Display services that include search string

Display services that include search string “sharepoint”

Get-Service -Displayname "*sharepoint*"
Display services that include search string

Get services begin with search string and an exclusion

Get services begin with search string “sp” and an exclusion “spo”

Get-Service -Name "sp*" -Exclude "spooler","sppsvc"
Get services begin with search string and an exclusion

Get object details for service

Get-Service SPAdminV4 | Select-Object *
Get service begin with Display services that include search

Display services that are running

Display services with status Running

Get-Service | Where-Object {$_.Status -eq "Running"}
Display services that are running

Display services that are Stopped

Display services with status “Stopped”

Get-Service | Where-Object {$_.Status -eq "Stopped"}
Display services stopped

Start Service powershell command

Below command returns how to start a particular service using powershell.

Start-Service ServiceName
example: ServiceName = SPAdminV4
Start-Service SPAdminV4

Stop Service powershell command

Below command returns how to stop a particular service using powershell.

Stop-Service ServiceName
example: ServiceName = OSearch16
Stop-Service OSearch16
how to stop a particular service using powershell

Disable Service powershell command

Below command returns how to disable a particular service using powershell.

Set-Service ServiceName -StartupType Disabled
or
Set-Service -Name ServiceName -StartupType Disabled
example: ServiceName = OSearch16
Set-Service -Name OSearch16 -StartupType Disabled
how to disable a particular service using powershell

Start Service with status stopped

Start service whose status is stopped bu running below command.

Get-Service Wsearch | Where {$_.status –eq 'Stopped'} | Start-Service
Krishna Bhajan | O Kanha Ab To Murli Ki Madhur | Old Hindi Bhajan | #KrishnaBhajan#OldHindiBhajan
Advertisements