How do I run a PowerShell script when the computer starts?

前端 未结 15 1160
-上瘾入骨i
-上瘾入骨i 2020-11-30 19:24

I have a PowerShell script that monitors an image folder. I need to find a way to automatically run this script after the computer starts.

I already tried the follow

15条回答
  •  一整个雨季
    2020-11-30 19:38

    Be sure, whenever you want PowerShell to run automatically / in the background / non-interactive, it’s a good idea to specify the parameters -ExecutionPolicy Bypass to PowerShell.exe

    PowerShell.exe -ExecutionPolicy Bypass

提交回复
热议问题