此Windows Powershell ExecutionPolicy错误消息是什么意思?

时间:2019-12-17 17:16:54

标签: powershell

我正在尝试运行PowerShell脚本,但出现此错误。它似乎并没有影响我的脚本,只是想知道这是什么。

Windows PowerShell Set-ExecutionPolicy错误: enter image description here

1 个答案:

答案 0 :(得分:-1)

Google是您的朋友,先生...

https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=145315848075

  1. 以管理员身份运行powershell

但是,如果问题仍然存在,并且“ Get-ExecutionPolicy -List”命令显示类似如下的内容:

MachinePolicy = RemoteSigned
UserPolicy       = Undefined
CurrentUser     = Unrestricted
LocalMachine  = RemoteSigned

以管理员身份在powershell命令行中执行以下命令:

Set-ExecutionPolicy“ RemoteSigned”-作用域处理-确认:$ false

Set-ExecutionPolicy“ RemoteSigned”-作用域CurrentUser-确认:$ false

这将为给定范围设置执行策略。

在执行“ Get-ExecutionPolicy -List”时,我们现在应该看到以下内容:

MachinePolicy = RemoteSigned
UserPolicy       = Undefined
Process           = RemoteSigned
CurrentUser     = RemoteSigned
LocalMachine  = RemoteSigned