Windows 2008 R2 Scheduled Task Not Running With Admin Privileges even if granted?

Posted by j.rightly on Server Fault See other posts from Server Fault or by j.rightly
Published on 2011-05-09T17:28:47Z Indexed on 2012/06/17 9:18 UTC
Read the original article Hit count: 483

I have a scheduled task that is running as USER. I have checked the box "Run with highest privileges" in the scheduled task properties. The task is a powershell script that, among other things, reboots the system. The script executes and runs normally, but as a scheduled task, it fails to reboot the system.

Here is the kicker: When I manually run the script as USER using the exact same command line as what's in the scheduled task, the script still runs but this time it actually reboots the system.

I have UAC disabled and USER is a member of the local Admins group. The local Admins group has the right to shut down the system. Nothing in the event logs offers any clues.

Why would the same script running under the same credentials work interactively but not as a scheduled task?

UPDATE: This is too weird. When the task ran on schedule, everything worked normally.

© Server Fault or respective owner

Related posts about windows-server-2008

Related posts about windows-server-2008-r2