windows powershell 报错 「无法加载文件 **,因为在此系统上禁止运行脚本」 问题的解决方案
在用 windows 执行脚本的时候报错:
|
1 2 3 4 5 6 7 8 |
.\ESXi-Customizer-PS-v2.6.0.ps1 : 无法加载文件 E:\OneDrive - kolo\1-PC 软件\5-开发软件\vmware\ESXi-Customizer-PS-v2.6.0. ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Executio n_Policies 。 所在位置 行:1 字符: 1 + .\ESXi-Customizer-PS-v2.6.0.ps1 -h + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : SecurityError: (:) [],PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess |
原因显而易见:因为安全原因,系统禁止执行脚本了。具体的相关信息可以参考 about_Execution_Policies 。最简单的解决方案就是输入以下命令: [crayon-6949a02f778 ... 阅读更多