ps1 cannot be loaded because running scripts is disabled on this system

后端 未结 9 740
执笔经年
执笔经年 2020-12-12 11:55

I try to run powershell script from c#.

First i set the ExecutionPolicy to Unrestricted and the script is running now from

9条回答
  •  有刺的猬
    2020-12-12 12:28

    This could be due to the current user having an undefined ExecutionPolicy.

    You could try the following:

    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
    

提交回复
热议问题