且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Powershell 脚本未在计划任务上运行

更新时间:2022-12-02 18:33:00

在计划任务中调用 Powershell.exe:

Call the Powershell.exe in your schedulded task:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

设置这个参数:

-noprofile -executionpolicy unrestricted -noninteractive -file "C:\Path\To\MyScript.ps1"