-1

I have a new Windows Server 2008 R2 host with a strange (?) behavior. I try to schedule a new task into Task Scheduler. I'm using a user that's part of administrators group.

  1. If I do it from the Task Scheduler GUI - the task is scheduled successfully.
  2. If I try to do it from a cmd window - it fails with "access denied" (no further info).
  3. If I open the cmd window with "Run as administrator" -it is scheduled successfully.

I have to make #2 works since I use it in a batch file. Can you tell me what could be the reason and how to resolve it?

Thank you

user1762109
  • 127
  • 6

3 Answers3

0

are administrative shares (c$, admin$ etc) enabled? can you access them using this account? i would reboot the machine, if that's not possible, logout/in.

you can also look at user access control in windows control panel to make sure there's no restriction. please try disabling it. let me know if it helps.

0

Just running as a user in the administrators group does not mean that you are using your elevated token. By running cmd as an admin you are using your elevated token. To run a batch file as an admin, you can just right click and run it as an admin as well.

Philosophene
  • 202
  • 1
  • 12
0

UAC prevents you from executing certain admin level commands even if you're logged in with an account that has administrator rights. You can either manually right-click on the batch file and choose "Run as Administrator" or disable UAC (not recommended) to avoid this scenario.

Jay Adams
  • 306
  • 1
  • 5