I try to run powershell script from c#.
powershell
First i set the ExecutionPolicy to Unrestricted and the script is running now from
ExecutionPolicy
Unrestricted
This could be due to the current user having an undefined ExecutionPolicy.
You could try the following:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted