If a script is not running or hanging when running task scheduler may indicate a 0x1 or 0x41301.
Try to change the -ExecutionPolicy parameter
powershell.exe -ExecutionPolicy Unrestricted -NonInteractive -NoProfile -File c:\scripts\script.ps1
If a script is not running or hanging when running task scheduler may indicate a 0x1 or 0x41301.
Try to change the -ExecutionPolicy parameter
powershell.exe -ExecutionPolicy Unrestricted -NonInteractive -NoProfile -File c:\scripts\script.ps1