NET STOP a Service Running on Server from Another Machine

Posted on 2009-05-13
Last Modified: 2013-12-01
I have a computer (windows 2003 server) from which I want to run a batch file and part of that batch file is to stop a service running on another computer (normally accessed by: \\computersname.)  I've tried this syntax:

\\computername net stop "servicename"

and got error message that directory, filename or syntax incorrect

and I've tried

net stop "servicename" \\computername

and get the error message that the synax of this command is:

I can run the net stop command on the server machince locally, but I need to run it from a different computer and am perplexed what I'm doing wrong here.

Anyone with thoughts on this?
Question by:tklingman
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2

Expert Comment

ID: 24381789
try the sysinternals (microsoft)  psexec.exe  tool

psexec.exe \\Server Net Stop "Service"

Open in new window

LVL 17

Accepted Solution

OriNetworks earned 125 total points
ID: 24381989
you can also try the SC command line utility

You can remotely start or stop services on remote servers using

sc \\myserver stop myservice

Expert Comment

ID: 24382008
That is the command I was trying to think of.   Good Call
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!


Expert Comment

ID: 24382108
By default Messenger Service is disabled in Win'XP. Pl. make sure Messenger Service in Enabled on remote pc whose service do you want to start/stop remotely.
Until You don't enable Messanger Service in Windows your Net send command will not start/stop service on remote PC.

Best of luck..

Bm keshav

LVL 96

Expert Comment

by:Lee W, MVP
ID: 24382535
To be clear, the NET command doesn't offer remote system control.  SC does.  Use SC.
LVL 17

Expert Comment

ID: 24391662
@BMKESHAV  i dont see how messenger service is related.

Expert Comment

ID: 24392124
Sorry I was wrong,
You can do like this :

sc \\computername start servicename

Pl.also see the attached txt file having inst.for how to use start/stop service on remote pc using project.


Author Comment

ID: 24397217
Thank you all for your input - all gave me things to think about, explore etc.  Turns out that the sc command worked like a dream!

Author Closing Comment

ID: 31581314
Thank you very much for taking the time to answer my question, it saved me time from looking at other options.

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Open Encryption Software Advice needed 4 78
PowerVault MD3400 Configuration 3 112
Dell Power edge R310 10 84
Can I substitute another SAS HD for an HP MB 1000FAMYU ? 3 78
How to fix error ""Failed to validate the vCentre certificate. Either install or verify the certificate by using the vSphere Data Protection Configuration utility" when you are trying to connect to VDP instance from Vcenter.
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question