3

I am at wit's end and totally confused. The goal is to take group policies(one per day of a week) and set a scheduled task which will trigger a reboot on that day at a specific time.

So I made them (see example below) yet.....they don't work? I've done additional manual reboots of the servers, gpupdate /force on the servers, changed the GPO from 'create' to 'update', and nothing seems to make them actually get applied.

enter image description here enter image description here enter image description here enter image description here

My two questions are:

  1. What am I doing wrong? I just want to schedule graceful restarts on a recurring pattern through group policy (other options are welcome, I guess)
  2. How can I fix it or acheive the same end result?

Goal is simply to: Set policyGPO from AD to reboot servers on certain days, push scheduled tasks to each server the GPO is attached to, have the servers run their received scheduled task going forward.

Edit - gpresult /H enter image description here

  • The GPO is edited on what OS ? On 2012R2 you got more scheduled task's option, thus it can't apply it to the 2008R2. I would use the GPO's console on a 2008R2 to push it on 2008R2's server in example – yagmoth555 - GoFundMe Monica Jun 9 '16 at 16:20
  • @yagmoth555 I have the RSAT tools on a Windows 8.1 client, forest functional level of domain is 2008 R2. Does it make a difference if I create the Group policy from the RSAT tools vs. on a domain controller? I wasn't aware that it did. Unless you are referring to which server I am connected to with the GPO tools in RSAT? – Abraxas Jun 9 '16 at 16:30
  • Yes, it make a difference, maybe not the why of your bug, but it make a diff. – yagmoth555 - GoFundMe Monica Jun 9 '16 at 17:01
  • If you've one GPO per day of the week, I guess you're filtering and applying them by groups... Have you checked your security groups, or your WMI filter? What's the output of gpresult/rsop.msc? – curropar Jun 10 '16 at 7:37
  • Just to clarify, are the tasks not being created, or are they just not running? Group policy scheduled tasks doesn't actually have anything to do with running the tasks, it just automates creating the task objects on the target systems. – tfrederick74656 Jun 15 '16 at 23:32
2

The scheduled task must be created in the GPO's console while sitting in the same OS core version that you will target. In example for 2008R2 you need to edit with a 2008R2 server or to use the RSAT tool on a Windows 7.

At each new OS version they add new scheduled task settings, and thus the task become not valid if the GPO target a OS that does not know those settings. (and thus does not apply)

If you have a mixed OU for your server you can use a WMI filter to target the correct OS with your GPO, like;

For Windows 2008R2 server

select * from Win32_OperatingSystem where Version like "6.1%" and ProductType = "2" 

For Windows 2012R2

select * from Win32_OperatingSystem where Version like "6.2%" and ProductType = "2" 
  • Thanks man! Really appreciate your help and this hit the mark perfectly! Out of curiosity - is there a better recommended way to schedule server reboots you would recommend? – Abraxas Jul 8 '16 at 21:26
  • @Abraxas Glad it helped :) For the script its the best way! as I tried some monitoring tool in the past, and when I was scheduling a reboot in the tool in the background it added a planned task.. So I think in the end a planned shutdown like you do is the way to go! – yagmoth555 - GoFundMe Monica Jul 9 '16 at 0:22
1

You can't use this function anymore:

http://support.microsoft.com/kb/2962486.

You need either create the tasks manual or use PowerShell or a like to script the creation of the tasks.

1

I have also recently run into an issue with creating scheduled tasks via group policy on my server 2012 R2 domain.Windows 2008 R2 is normal. I have fixed it.

Below is the solution(need to note the two points).Just for reference.

Point 1:create a task select Schedule Task(At least windows 7)or Immediate Task(At least windows 7).The normal task (Schedule Task does't work for 2012 R2)

image

Point 2:select user "NT AUTHORITY\System" to run the task.

enter image description here

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.