powershell 存储库不会被注册

powershell 存储库不会被注册

我尝试注册 PSGallery-Repository 以使用类似的 cmdlet Install-Module。因此我使用了:

 Register-PSRepository -Name "PSGallery" -SourceLocation "https://www.powershellgallery.com/" -InstallationPolicy Trusted

Powershell 告诉我使用Register-PSRepository -Default来注册 PSGallery-Repository

所以我做了...

我想证明它是否成功但是:

Get-PSRepository

返回“未找到包源”

Install-Module -Name VMware.PowerCLI没有用。

有人能告诉我我的错误在哪里吗?PowerShell 版本是 5.1

答案1

我错过了代理身份验证。我将其添加到我的 $profile 中,现在它可以正常工作了。

相关内容