MEET ACTION1 AT RSA CONFERENCE 2024

May 6 - 9 | San Francisco | Booth #5472

Action1 5 How-to Articles 5 Controlling of Services via SC, PsService, MMC Remotely

Controlling of Services via SC, PsService, MMC Remotely

July 5, 2019

By Peter Barnett

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

1. Using SC to Control Windows Services

The SC command is used to configure, query, stop, start, delete, and add system services on the Windows command line. Most of the SC command subcommands apply equally to drivers. If you have the appropriate permissions, the SC command can be used to manage services on both the local and remote systems.

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

Remote Control of Services Using SC, Psservice.exe, MMC. Option 1 SC command

2. Using NET utility to Control Windows Services

The PsExec utility is part of the Sysinternals PsTools package. It allows you to run commands on remote computers and does not require installation in the system. To use the utility, simply copy it to the folder with executable files (eg C: \ Windows \ system32) and run it from any command line shell: Cmd or PowerShell.

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

wherestop | start is used for start/stop the service

3. Using PowerShell to Control Windows Services

Start the Windows PoweShell console with administrative privileges. To get a list of services registered on the local computer, use the cmdlet:

Get-Service

To check status use command:

Get-Service -ComputerName computer -Name servicename

Remote Control of Services Using SC, Psservice.exe, MMC. Using PowerShell Get service command

Perform the next actions to start, stop or restart services:

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.exe to Control Windows Services

PsService.exe is a command line utility for viewing and managing Windows services. PsService displays the status, configuration, and dependencies of services, and also allows you to start, pause, and restart them. The software allows you to log into the remote computer on behalf of another account in cases where the current account does not have the permissions necessary to access the remote system. The PsService utility includes a unique search function that allows you to detect active instances of a specified service on the network.

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

Use next command to view the configuration:

PsService.exe \\computer config servicename

To Start, stop, restart execute following

PsService.exe \\computer restart|stop|start servicename

psservice to restart service

Also, you can configure service with help of command:

psservice \\computername -u admin -p pass setconfig servicename Auto|Disabled|Demand

5. Using MMC Snap to Control Windows Services

The Microsoft Management Console (MMC) is a place to store and display administration tools created by Microsoft and other software vendors. These tools are called snap-ins and are used to manage Windows hardware, software, and network components. Some tools located in the Administration folder, such as Computer Management, are MMC snap-ins.

To change the state of the service, to stop it, or to restart you will need to perform the following steps:

  • 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, regularly
Services and Applications snap MMC

Consider Using Action1 to Start Windows Service Remotely if:

  • You need to perform an action on multiple computers simultaneously.
  • You have remote employees with computers not connected to your corporate network.

Action1 is a cloud-based remote monitoring and management encompassing tools such as automated patch management, software deployment, remote desktop, software/hardware inventory, endpoint management, and IT reporting.

See What You Can Do with Action1

 

Join our weekly LIVE demo “Patch Management That Just Works with Action1” to learn more

about Action1 features and use cases for your IT needs.

 

spiceworks logo
getapp logo review
software advice review
trustradius
g2 review
spiceworks logo

Related Posts

No Results Found

The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.