HOWTO: Remote control of Windows services

Sometimes it is necessary to restart / stop / start the Windows service / service. For this purpose, you can use built-in and third-party tools, both on the command line and GUI options.
This How-to describes different ways to Start or Stop Windows Service Remotely.

1. Using SC:

   - Use this command to manage / poll service states, sc can be used locally and remotely, remote polling of service status
sc \\computer query servicename
Also you can find out the type of service startup:
sc \\computer qc servicename
Stop or start the service:
sc \\computer start|stop servicename
Also you can change the type of service startup:
sc \\computer config servicename start=auto|demand|disabled

2. Using NET utility:

   - Remotely, this command can be used in conjunction with psexec.exe, from the PSTOOLS kit. Everything is simple here - we use the command remotely using psexec:
PsExec.exe \\computer net stop servicename && net start servicename
where stop | start is used for start/stop the service

3. Using PowerShell:

   - Check status:
Get-Service -ComputerName computer -Name servicename
Perform actions:
Get-Service -ComputerName computername -Name servicename | Restart-Service -Force
Get-Service -ComputerName computername -Name servicename | Stop-Service -Force
Get-Service -ComputerName computername -Name servicename | Start-Service

4. Using PsService:

   - Included in the same set of PSTOOLS, this utility I liked most of all, the request for the status of the service:
PsService.exe \\computer query servicename
View configuration:
PsService.exe \\computer config servicename
Start, stop, restart:
PsService.exe \\computer restart|stop|start servicename
psservice \\computername -u admin -p pass setconfig servicename Auto|Disabled|Demand

5. Using MMC snap:

   - Ctrl + R> In the input field enter the command> MMC
File> Add / Remove Snap-in ....
Computer Management> Add> Specify Computer Name
In a snap - Services and Applications> Services
Select service> Perform actions required, in a regular manner

Also consider using Action1 to start Windows service remotely if:
- You need to perform this action on multiple (hundreds or even thousands) computers simultaneously.
- Some of your endpoints are laptops not connected to corporate network at all times.

Action1 is a cloud-based platform for software deployment, software/hardware inventory, patch management, endpoint configuration and more. It is free with basic functionality.

Other Relevant HOWTOs: