今天在自己电脑上安装polaris的时候报了这个错误:
无法加载文件 D:\software\polaris\polaris-standalone-release_v1.11.1.windows.amd64\install-windows.ps1,因为在此系统上禁
止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
+ CategoryInfo : SecurityError: (:) [],ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess
请按任意键继续. . .
原因是计算机上启动 Windows PowerShell 时,执行策略很可能是 Restricted(默认设置)的问题。
解决方法:
1.打开PowerShell:
2.查看计算机上的现用执行策略,输入 get-executionpolicy
3.以管理员身份打开PowerShell 输入 set-executionpolicy remotesigned
4.选择Y,再次输入 get-executionpolicy查看
这样就解决了。