PowerShell says “execution of scripts is disabled on this system.”

前端 未结 30 2392
傲寒
傲寒 2020-11-22 00:45

I am trying to run a cmd file that calls a PowerShell script from cmd.exe, but I am getting this error:

Management_Instal

30条回答
  •  梦如初夏
    2020-11-22 01:22

    In PowerShell 2.0, the execution policy was set to disabled by default.

    From then on, the PowerShell team has made a lot of improvements, and they are confident that users will not break things much while running scripts. So from PowerShell 4.0 onward, it is enabled by default.

    In your case, type Set-ExecutionPolicy RemoteSigned from the PowerShell console and say yes.

提交回复
热议问题