Powershell script does not run via Scheduled Tasks

后端 未结 18 881
南方客
南方客 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:23

    Change your Action to:

    powershell -noprofile -executionpolicy bypass -file C:\path\event4740.ps1

    On a Windows 2008 server R2: In Task Scheduler under the General Tab - Make sure the 'Run As' user is set to an account with the right permissions it takes to execute the script.

    Also, I believe you have the "Run only when user is logged on" Option checked off. Change that to "Run whether user is logged on or not". Leave the Do Not Store password option unchecked, and you'll probably need the "Run with Highest Privileges" option marked.

提交回复
热议问题