在安装PowerShellGet时,我执行以下操作:
Install-PackageProvider Nuget –force –verbose然后退出,尝试运行以下命令:
Install-Module –Name PowerShellGet –Force –Verbose当我这样做的时候,我得到了错误:

当我尝试安装其他模块时出现此错误,如MSOnline,Azure等。我有最新版本的Powershell和必要的模块。我觉得是因为PowershellGet文件的原因。
有没有办法解决这个问题?
发布于 2018-09-03 20:36:34
您需要在安装PowerShellGet之前注册PowerShell存储库。尝尝这个
Register-PSRepository -Name “PSGallery” -SourceLocation “https://www.powershellgallery.com/api/v2/" -InstallationPolicy Trustedhttps://stackoverflow.com/questions/52149373
复制相似问题