How do I execute a PowerShell script automatically using Windows task scheduler?

后端 未结 9 1710
甜味超标
甜味超标 2020-11-29 23:24

I have one PowerShell script which sends emails. I want to execute that script automatically, every 1 minute. How can I do it, using task scheduler?

Currently I have

9条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 23:58

    You can use the Unblock-File cmdlet to unblock the execution of this specific script. This prevents you doing any permanent policy changes which you may not want due to security concerns.

    Unblock-File path_to_your_script
    

    Source: Unblock-File

提交回复
热议问题