'Powershell Install-PackageProvider No match was found for the specified search criteria for the provider 'NuGet
From a Windows Server 2019 server Ran as Administrator in Powershell window with the following command
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Got the following error
WARNING: MSG:UnableToDownload «https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409» «» WARNING: Unable to download the list of available providers. Check your internet connection. WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''. Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags. At line:1 char:1 Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force CategoryInfo : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-Pac kageProvider], Exception + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackagePro vider
Powershell version is 5.1.17763.2268 and is able to open public website from the machine. I tried all the suggested solutions I can find online (below) but still getting the same error. Wondering if there's anything else can be done to fix this issue?
- Setting [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- Setting [System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
- Get-PackageProvider | where name -eq 'nuget' | Install-PackageProvider
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
