I can run the script outside and inside the Task Scheduler. But the scheduled tasks will not run the script automatically when triggered. I have tried configuring the Local Secu
Call the Powershell.exe in your schedulded task:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Set this arguments:
-noprofile -executionpolicy unrestricted -noninteractive -file "C:\Path\To\MyScript.ps1"