I need to create a schedule task using Powershell with \"Run whether user is logged on or not\".
I use the following codes to create a task, and I\'ve checked the me
It was the last parameter in the RegisterTaskDefinition() method... change it from 0 to 1.
RegisterTaskDefinition()
http://msdn.microsoft.com/en-us/library/windows/desktop/aa382577(v=vs.85).aspx