Complete Guide: How to Start & Stop Windows Service Remotely on Several Devices

How to Start or Stop a Windows Service Remotely blog banner image

This guide demonstrates how to start & stop Windows service remotely, which will allow you to configure Windows services across multiple devices with PowerShell, the Windows Services Manager, or by remote desktop. Furthermore, we explore why it’s important to deploy tools for managing Windows services for secure remote management in an enterprise environment.

About Remote Windows Services Management

Windows services are programs that run in the background and don’t require your input. They do not have an application window or icon on the taskbar, so they’re mostly hidden from view. Their purpose is to provide system functionality from the point your computer starts up, including things like sound and networking that are built into the Windows operating system, and software you install yourself like antivirus and VPNs.

Windows services can be managed remotely, allowing you to start and stop service over a network connection. This is useful in enterprise and corporate scenarios for IT administration (for example, to start a VPN service on a remote machine after it has been installed), but also useful for home users with multiple Windows devices they want to keep control over.

There are several built-in ways to start/stop Windows services remotely, including using PowerShell, the Windows Management Instrumentation (WMI) interface, and remote desktop.

How to find a Windows service name

To start or stop a Windows service you need to know its name. This can be found in Windows Services Management by following these steps:

  • Right-click on the Start menu.
  • Click Run.
  • Type services.msc and hit enter to launch Windows Services Manager.
  • All configured services will be listed. This also works when using the remote Windows Management Instrumentation (WMI) steps shown below.

If you are working in PowerShell, you can run the following command to list all services using the Get-Service cmdlet:

Get-Service | Sort-Object Name

Note that the service name may be different from its display name.

How to start and stop Windows service remotely using PowerShell

The most efficient way to start or stop a Windows service remotely is using PowerShell. Before you can do this, you need to enable remote management on the remote computer by running the following command:

Enable-PSRemoting -Force

This executes the Enable-PSRemoting cmdlet with the -Force option, so it will not prompt for confirmation.

Note that it is vital that you read and understand PowerShell commands before running them, so that you do not accidentally perform an action that may damage your system.

On non-server versions of Windows, the Enable-PSRemoting command will automatically create a Windows Firewall rule allowing remote management. To enable this rule, run the following PowerShell command on the remote computer:

Enable-NetFirewallRule -Name “WINRM-HTTP-In-TCP-Public”

Finally, prompt for credentials and run the Start-Service cmdlet remotely to start a service:

$credentials = Get-Credential

Invoke-Command -ComputerName “COMPUTER_NAME” -ScriptBlock {

Start-Service -Name “SERVICE_NAME”

} -Credential $credentials

In the above command, you will need to replace:

  • COMPUTER_NAME with the network name of the remote computer you want to start the service on.
  • SERVICE_NAME with the name of the service you want to start.

If you want to stop a service, replace the Start-Service cmdlet with Stop-Service

$credentials = Get-Credential

Invoke-Command -ComputerName “COMPUTER_NAME” -ScriptBlock {

Stop-Service -Name “SERVICE_NAME”

} -Credential $credentials

In both of the above start/stop examples, the Get-Credential cmdlet is used to prompt the user for the username and password for the remote machine.

Then, Invoke-Command is called to send a block of code (using the -Scriptblock parameter, and the code surrounded by curly braces) containing the Stop- or Start-Service cmdlet, along with the previously stored $credentials.

How to start or stop a service on multiple Windows PCs

The above PowerShell commands can be adapted to run on multiple remote Windows machines simultaneously, allowing you to start and stop services on all of them with a single command:

$computers = “COMPUTER_NAME_1”, “COMPUTER_NAME_2”, “COMPUTER_NAME_3”

$credentials = Get-Credential

Invoke-Command -ComputerName $computers -ScriptBlock {

Stop-Service -Name “SERVICE_NAME”

} -Credential $credentials

Above, a list of remote computers’ network names have been listed in the $computers variable. This variable is then passed to the -ComputerName parameter in Invoke-Command (rather than passing a single computer’s name in the previous examples). The command will be sent to all of those computers and executed. This does, however, depend on the provided user credentials matching on all the listed machines.

How to start and stop Windows service remotely using Windows Management Instrumentation (WMI)

The Windows Service Management console used to find the names of services, mentioned earlier in this article, can also be used to remotely manage Windows services.

To do this, click on Action in the menu bar, and then Connect to another computer…

To do this, click on Action in the menu bar, and then Connect to another computer...

You will then be prompted to enter the network name of the remote computer to connect. Windows Management Instrumentation (WMI) allows you to use Windows Services Management to control the services on the remote machine, as if you had run services.msc on that machine itself.

You will then be prompted to enter the network name of the remote computer to connect.

Once connected, you can view the list of services and can right-click on them to stop or start them.

Using Remote Desktop Protocol (RDP) for remote IT administration

Windows contains built-in remote desktop functionality. When using this, you have a full view of the remote computer’s desktop, with full control over the keyboard and mouse, just as if you were sitting in front of it.

This allows you to use all the local service management tools, including the Windows Services Manager console and PowerShell.

To connect to a Windows computer using Remote Desktop, follow our guide here.

Use cases for remotely managing Windows services

There are several common scenarios for managing Windows services remotely:

  • Managing Windows services on small networks: Small office and home networks can be administered with simple tools. Using remote desktop to perform system maintenance tasks is not unusual in this environment, though it is inefficient if you manage multiple small networks.
  • Managing Windows services on medium-sized networks: On medium-sized networks, using WMI tools and the tools provided by Windows domain controllers can streamline IT operations and make managing remote machines, including running services, more efficient.
  • Managing Windows services remotely on enterprise-scale networks: In education and large-scale business networks, especially those where users may bring their own devices (BYOD) or work remotely via VPN, maintaining the security and usability of Windows devices can be a challenge. Remote Monitoring and Maintenance (RMM) can assist by providing a unified and automated management platform for all of your devices in an end-to-end solution.

Which method you use will probably depend on whether this is a once off task, or whether you will be regularly starting and stopping Windows services on multiple computers.

Scripting and automation play a key role in efficiently managing fleets of Windows devices. For example, if you are constantly restarting services on remote machines, you can use the PowerShell command shown in the above example in a script that runs periodically.

Remote windows management

In mission-critical environments, the best solution for ensuring that remote services are running correctly is to use a remote monitoring and management solution. NinjaOne RMM gives your IT team full visibility over your entire IT infrastructure, including what services are running on each machine, and can alert you of any programs that may be making computers run slowly.

Integration with antivirus and firewall solutions means that if a user installs a service that acts suspiciously, you can be alerted and take proactive measures to isolate and deal with the problem before it affects your business operations.

Next Steps

Building an efficient and effective IT team requires a centralized solution that acts as your core service deliver tool. NinjaOne enables IT teams to monitor, manage, secure, and support all their devices, wherever they are, without the need for complex on-premises infrastructure.

Learn more about Ninja Endpoint Management, check out a live tour, or start your free trial of the NinjaOne platform.

You might also like

Ready to become an IT Ninja?

Learn how NinjaOne can help you simplify IT operations.

Watch Demo×
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

Start your 14-day trial

No credit card required, full access to all features

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).