Task scheduler scheduled task at startup not working

You are executing this Task with "VM" user privileges. Does "VM" account have "Run as a batch Job" rights?

How are you setting up your scheduled task, through local Task Scheduler or through DC GPO Preferences. What I've noticed is if the task is created through DC GPO Preferences is the same ... task will never execute (no matter what you are executing, VBS, PowerShell, CMD, EXE) if the only trigger is "At startup". I must create my Tasks with two triggers:

  1. At task creation/modification

  2. At startup

Now the task executes correctly every time I restart my computers.

REMARK

  1. This only applies if the Tasks are created through GPO Preferences on the DC side.

  2. This only applies for the trigger "At startup". As far as I have seen, every other trigger works fine.

  3. Be sure not to use "Replace" mode when creating this GPO Preference if you do not want for the Task to execute every time computer refreshes it's GPO's. In "Replace" mode during refresh the Task is being recreated and the trigger is "At task creation/modification". Use "Update" mode instead. Also this is where you see one problem with this workaround ... you can not create the Task in this way that should delete itself once the Computer is no longer part of Domain because those kind of Tasks require the "Replace" mode.


I struggled a while with the same problem. In my case, the problem was the setting "Start the task only if the computer is on AC power".


Why don't you run this batch file as a windows service? Is there any particular reason? FYI: http://nssm.cc/usage