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

前端 未结 30 2409
傲寒
傲寒 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:17

    I found this line worked best for one of my Windows Server 2008 R2 servers. A couple of others had no issues without this line in my PowerShell scripts:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force -Scope Process
    

提交回复
热议问题