How to schedule a task wether the user is logged on or not in PowerShell?

廉价感情. 提交于 2019-11-29 05:37:08

You'll need to specify a user (like /RU system), but it should be the default whether to run logged in or not. You can look at this link for a list of all schtasks.exe parameters.

ClarD

if you add

/RU <username> /RP <password>

to the call to schtasks.exe you will get "Run whether user is logged on or not" selected.

You can also use the /NP instead, which will also give you "Run whether user is logged on or not", but also "Do not store password..." which will limit the accessible resources.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!