我试图在激活的Windows Server 2016标准上安装Docker.我执行“Install-Module -Name DockerMsftProvider -Repository PSGallery -Force”但失败了.它建议找不到PSGallery.我执行了"Get-PSRepository".错误:
警告:无法找到模块存储库.
我用谷歌搜索了3种方法来解决它,但没有奏效.
我Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Verbose -Force成功执行了.
我成功安装了巧克力.
我执行"powershell Register-PSRepository -Name "PSGallery" –SourceLocation "https://www.powershellgallery.com/api/v2/" -InstallationPolicy Trusted"但失败了.它让我使用"Register-PSRepository -Default".
我试过"powershell Register-PSRepository -Default -Name "PSGallery" –SourceLocation "https://www.powershellgallery.com/api/v2/" -InstallationPolicy Trusted"但仍然失败了.我怎么能解决这个问题?