Service commands in windows powershell

Viewing services You can view all services using below syntax.
 
> Get-Service

You can use below command to view specific service.
 
> Get-Service -Name <service-name>

Stopping services
 
Get-Service -Name <service-name> | Stop-Service

Starting service
 
Start-Service <service-name>

Restarting services
 
Restart-Service <service-name>

Here is the list of other service commands.
  • Suspend-Service – This Cmdlet lets you to suspend the services.
  • Resume-Service – This Cmdlet allows you to resumes services.
  • New-Service – This Cmdlet allows you to create a new service.

Web development and Automation testing

solutions delivered!!