简体   繁体   English

Cloudn't register-PSRepository 在我的 Windows10 中安装 Azure PowerShell

[英]Cloudn't register-PSRepository in my Windows10 for installing Azure PowerShell

I want to install Azure PowerShell in my windows 10, but I met an error message, I tried to find the reason for the error and found there was no package when I ran Get-PSRepository .我想在我的 Windows 10 中安装 Azure PowerShell,但我遇到了错误消息,我试图找出错误的原因,但在运行Get-PSRepository时发现没有包。

Background: Install azure with code as below:背景:使用以下代码安装 azure:

Install-Module -Name Az -AllowClobber -Scope AllUsers

Install-Module -Name Az -Repository PSGallery -Force

Error message:错误信息:

Can't find the package at C:\\Program Files\\WindowsPowerShell\\Modules\\PowerShellGet\\1.0.0.1\\PSModule.psm1:1748C:\\Program Files\\WindowsPowerShell\\Modules\\PowerShellGet\\1.0.0.1\\PSModule.psm1:1748找不到包

Register-PSRepository -Default

Get-PSRepository shows can't find the package. Get-PSRepository显示找不到包。

net winhttp show proxy shows without proxy server net winhttp show proxy显示没有代理服务器

what should I do to install the azure PowerShell?我应该怎么做才能安装 azure PowerShell?

Based on your error message, it seems that you have connection issue to powershell gallery根据您的错误消息,您似乎有与powershell 库的连接问题

So, my first suggestion is to check your network environment work.所以,我的第一个建议是检查你的网络环境工作。 Also remember to check your system proxy settings.还记得检查您的系统代理设置。

If your network has no problem, you may download package manually and then install modules from the downloaded nuget package如果你的网络没有问题,你可以手动下载包,然后从下载的nuget包中安装模块

Another choice is to use Azure Cloud Shell另一种选择是使用Azure Cloud Shell

Hope the above could be helpful to you!希望以上内容对您有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM