I'm executing the following command :
schtasks /create /tn "test" /ru system /SC onevent /TR "test" /F /RL HIGHEST /MO "*[System[Provider[@Name='SupportAssistService'] and EventID=900]]" /EC APPLICATION
[Using the command references for SCHTASKS for Server 2008 and server 2012, I'm unable to figure out how to do the following options that are available in the task scheduler GUI.
- Undo/Uncheck the power option which says start the task only when on AC power, as well as stop if computer switches to battery power
- Run task as soon as possible after a scheduled start is missed
- If the task fails, restart every x minutes up to y times
- If the task is already running then do not start a new instance
Does anyone know how to create a task from the command line with those options?