Powershell script does not run via Scheduled Tasks

后端 未结 18 884
南方客
南方客 2020-12-02 23:12

I have a small script on my Domain Controller that is setup to email me via SMTP about the latest Security Event 4740.

The script, when executed manually, will run a

18条回答
  •  既然无缘
    2020-12-02 23:30

    I think the answer to this is relevant too:

    Why is my Scheduled Task updating its 'Last Run Time' correctly, and giving a 'Last Run Result' of '(0x0)', but still not actually working?

    Summary: Windows 2012 Scheduled Tasks do not see the correct environment variables, including PATH, for the account which the task is set to run as. But you can test for this, and if it is happening, and once you understand what is happening, you can work around it.

提交回复
热议问题