使用任务计划程序执行PowerShell脚本时修复(0x1)错误

时间:2019-03-15 13:17:56

标签: powershell taskscheduler

我正在尝试运行每小时运行一次的PowerShell脚本。 当我在Task Scheduller之外运行脚本时,它运行正常,但是当我尝试使用Task scheduller运行时,它显示了一个(0x1)错误。

这是我的任务配置方式:

Task Configuration

  • 操作:启动程序
  • 程序/脚本: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
  • 添加参数(可选): powershell.exe -NoProfile -NoLogo -NonInteractive -ExecutionPolicy Bypass -File \\C:\xampp\java_monitor.ps1
  • 开始于(可选):

有人知道我应该更改或添加哪些内容以解决执行问题吗?

0 个答案:

没有答案