How can I give an account permission to start or stop a particular Windows Service using SC.exe?

What I'm trying to do is from one machine A call these operations from another machine B:

net.exe use \\B /delete
net.exe use \\B /user:B\<username> <password>
sc.exe \\B stop <service name>

The issue is that the first two operations pass but the third one fails.


You have to give your user the permission to stop the service either explicitly or via the membership of a sufficiently privileged group. This can be done by first changing a security template using the Security Templates MMC snapin and subsequently applying it to your system either locally or via group policy. This works at least on from Windows XP.

  • The pre-built Security Template MMC is secpol.msc. – Nathan Hartley Aug 16 '12 at 16:44
  • Linked pages "locally" and "via group policy" no longer work. – CJBS May 18 '18 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.