关于解决PowerShell 访问PSGallery的InstallationPolicy为Untrusted的问题.
PowerShell安装模块时,可能会提示无法访问PSGallery,此时Get-PSRepository执行后获得InstallationPolicy是untrusted.如果直接执行Set-PSRepository-NamePSGallery-InstallationPolicytrusted是无法生效的,因为.net4中没有启用额外的加密协议,会导致访问PSGallery失败.此时需要向.net4的注册表添加安全协议生效的项目Set-ItemProperty -Pa...
翻译
2020-06-26 17:59:20 ·
4789 阅读 ·
0 评论