How to set schedule.service “Run whether user is logged on or not” in Powershell?

前端 未结 1 1489
鱼传尺愫
鱼传尺愫 2020-12-21 16:47

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

相关标签:
1条回答
  • 2020-12-21 17:20

    It was the last parameter in the RegisterTaskDefinition() method... change it from 0 to 1.

    http://msdn.microsoft.com/en-us/library/windows/desktop/aa382577(v=vs.85).aspx

    0 讨论(0)
提交回复
热议问题