3

I've noticed if I create the Task for all my PC's on my DC through GPO Preferences with the "At startup" trigger (no matter what I execute, it can be VBS, EXE, PowerShell ...), Task will never execute.

So, this would be prerequisites:

  1. Task should be created on the DC side with GPO Preferences (locally created Tasks work just fine, so please, don't bother checking this locally because it will work).

  2. The problem is in "At startup" trigger ... all other triggers work just fine.

Picture 1. - General tab

Picture 2. - Triggers tab

First I suspected something is wrong with the clients or DC or other GPO's or Windows Updates or ... So, I've setup two new VM's.

DC Server: Windows Server 2016, clean, no updates and only three GPO's (unmodified "Default Domain Policy", unmodified "Default Domain Controllers Policy" and my GPO that only creates one Task with the trigger "At startup")

Client: Windows 10 v1809, clean, no updates

It didn't help. I've then fully updated both DC Server and Client. It didn't help.

I have a workaround. Exactly the same Task with all the same options will execute during "Startup" just fine if it is created with two triggers:

  1. At task creation/modification

  2. At startup

Picture 3. - Workaround Triggers tab (Multiple triggers)

Could someone confirm to me this is happening on their end also? Does someone have an explanation for this behavior?

Although I have a workaround for this, this is a problem. Why? Well what if we want Task to be executed only during startup and we want the task to be deleted once the computer is no longer part of Domain. Well, then it's a problem. If we want the Task to be deleted once the computer is no longer part of Domain, the Task must be created in "Replace" mode. But when the Task is in "Replace" mode, the Task is recreated every time the Client refreshes it's GPO (every so often), and we have our trigger configured to execute the Task "At task creation/modification", which means Task will not only execute during Startup but every time the computer refreshes it's GPO.

I would be grateful for any input you could give me or if you could at least confirm this is happening on your side also.


Thanks to the "Swisstone's" comment I've managed to figure out what is going on exactly. Also, maybe someone could have figured out solution instantly if I have fallowed one of the rules of this forum "be specific, be very specific and gather all the DATA".

Picture 4. - And the problem was ...

If the task is created in "Replace"/"Update" mode, the Task is being recreated/updated all the time, and if you set the delay for the Task of 30 seconds, Task is being recreated/updated before it has time to trigger during startup.

You could of course always create the Task in "Create" mode but I don't ever create any GPO Preferences in that manner (you can not change it, you can not delete it once the Computer is no longer a part of Domain, so, not very useful method of creating any GPO Preference, at least not for me).

Thank you "Swisstone" one more time.

3
  • 1
    I've seen this happen when the task is recreated. Try setting a run once on the GPO, setting to create not update, etc. – Tim Brigham May 1 '19 at 17:29
  • 2
    Can you check this event log on the client ?: Applications and Service logs -> Microsoft -> Windows -> TaskScheduler -> Operational and see if you can find interesting informations or warning. – Swisstone May 1 '19 at 19:08
  • @toofat So what did you to do actually resolve it? Did you set the delay for longer than 30 seconds? Mine is currently set at 30 seconds and is not triggering. – Beems Nov 13 '20 at 20:35
0

I found a workaround for the issue of enabling apply once and then later wanting to update the task. If I set the task to Replace with apply once enabled, I can get any other changes to apply by unchecking apply once, clicking ok, then checking apply once again, and clicking ok again caused the task to update.

2
  • Does this address the question? It appears to be unrelated to setting Tasks to execute at Startup, but I may be wrong. – Joshua Nurczyk Feb 15 at 22:30
  • Yes it is related. The easiest workaround if you want a startup delay is to set the task to apply once. However, clients did not pick up any later changes to the GPP unless I performed the above steps with the action set to replace. – iNERyonGHTFu Feb 17 at 0:04

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.