I'm trying to run simple Powershell script (eg. just with dir command) on Windows Server 2008 using external program which will call Powershell
powershell.exe "& 'C:\Temp\myscript.ps1'"
I have set (run as administrator) execution-policy unrestricted. After all, I get this error from the client
99: File C:\Temp\myscript.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please
see "get-help about_signing" for more detai ls. At line:1 char:2 + & <<<< 'C:\Temp\myscript.ps1' + CategoryInfo
: NotSpecified: (:) [], PSSecurityException + FullyQualifiedErrorId : RuntimeException
Why I'm getting this error? Isn't unrestricted execution policy enough?