0

I am currently running into a bit of a problem. I am trying to create a GPO that reboots all computers in a specific OU at a specific time using Server 2008 R2 64 bit.

I have gone into GP management, created a new GPO, went to computer configuration, preferences, control panel settings, then scheduled tasks.

Right clicked and created a new scheduled task as follows:

Action: Create Name: Test Reboot Run: shutdown.exe /f /r username: admin pass: pass Scheduled to run at said time I want.

The GPO replicates as needed. I see it in computer management, but it never runs and gives an error message in the history. The error message is as follows:

Task Scheduler failed to launch action "shutdown.exe /f /r" in instance "{5171f2bf-de1c-4fae-bbb8-e8db9370ed1f}" of task "\Test Reboot". Additional Data: Error Value: 2147942403.

Am I using the wrong command? If I am can you please tell me what I should be using?

3
  • your admin account likely doesn't have "logon as batch job" rights. However, what are you doing that you need to reboot servers via GPO?
    – HostBits
    Mar 18, 2013 at 16:22
  • Hi, its not for servers. This is for computers around the office. How do I add those rights?
    – Mike K
    Mar 18, 2013 at 16:25
  • Also, the machine im using to test the GPO on, says that the logon as batch job is set for the administrators group. The admin account is in there.
    – Mike K
    Mar 18, 2013 at 16:41

1 Answer 1

1

Command shutdown.exe /f /r seems to be ok, but I would check some settings in your scheduled task.

When you specify program to run as scheduled task, you shuold write parameters (arguments) in separate field named Arguments. In your case, you should set Run: shutdown.exe and Arguments: /f /r.

11
  • im going to give this a try now, apparently the shutdown.exe has issues. Someone told me to try powershell and use restart-computer. Do you know anything about that?
    – Mike K
    Mar 20, 2013 at 15:02
  • When I use powershell, it tells me the user account does not have permission to run this task. Im logged in as the domain admin account and as stated before, I have the logon as batch job permission too. Actually, let me change this statement. If im not logged in as a domain admin it wont run. Logged in as normal user, it wont reboot.
    – Mike K
    Mar 20, 2013 at 15:06
  • I have set the tasks to run as an admin. IM going to test not running it as an admin.
    – Mike K
    Mar 20, 2013 at 15:11
  • No, go just says I dont have permissions.
    – Mike K
    Mar 20, 2013 at 15:17
  • do you have UAC enabled? I am not sure, it can help, but just for testing I would try to disable it. as a normal local user, you dont have permission to shut down computer - you must have Shutdown privilege (and as far as I know, also Force shutdown form remote system privilege) Mar 20, 2013 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .