Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Well... title says it all, actually. We've got a Scheduled Task set up on a windows server 2003 box running as the Network Service, and the batch file it runs will invoke "sc" to stop and then start a service on another windows box, however sc reports:

[SC] OpenService FAILED 5:

Access is denied.

Running the same batch file via the windows explorer has no issues, and my user account is part of the Administrators group so I believe this is why there are no issues when I try it manually. Is this a permissions thing I enable for Network Service on the first server? Or do I enable permissions for Network Service somehow on the target server?

This question ( touches on something similar, but I'm looking for enabling the Network Service to access the service via the scheduled task.

share|improve this question

Try adding the AD account for the computer which is trying to run the command to the Administrators group on the computer with the service being modified.

If the computer running the scheduled task is SERVER1 and the other machine is SERVER2 then in SERVER2's local administrators group put YOURDOMAIN\SERVER1$. The $ is important.

share|improve this answer
thanks, we will try this out. the other server is administered by a different group so it might take a few days to get to it... – weiji Dec 1 '10 at 18:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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