How to remotely stop / start / … Windows Services

It’ll sometimes happen to you that you want – or in most cases, need – to restart a service on a windows machine.  Personally, I’ve struggled with the DNS-service on a SBS 2003 server for a long time, which required a restart every week.  Because it’s time-consuming to log in to the target machine to manipulate the service; you should learn how to do this remotely.

Yes, you can install the admin pack issued by Microsoft, but the fastest way to work with services is the windows command prompt (Which is, apparently, not a popular tool amongst end users.).  Here’s how you get the job done.

  1. Open command prompt (Start > Run > cmd for windows XP, or just type “cmd” in the bar @ the start menu for Vista / Windows 7)
  2. To stop a service, type: sc \\(ip or name of target computer) stop “servicename”
  3. To start a service, type: sc \\(ip or name of target computer) start “servicename”
  4. To pause a service, type: sc \\(ip or name of target computer) pause “servicename”
  5. To continue a service, type: sc \\(ip or name of target computer) continue “servicename”

For a full list of service-related commands you can browse to this nifty website.

Take note:  In order to execute these commands, your user account you’re logged in with needs administrative rights at both your local machine and the remote machine.   

Advertisements