Recently, while I was trying to install the Azure Powershell module, I got this error No match was found for the specified search criteria and provider name ‘NuGet’. In this article, I will walk you through the quick steps to fix this error.
No match was found for the specified search criteria and provider name ‘NuGet’
I was executing the below line of code, and I got this error.
if (Get-Module -Name AzureRM -ListAvailable) {
Write-Warning -Message 'Azure module not installed.'
} else {
Install-Module -Name Az -AllowClobber -Scope AllUsers
}Ohh, again I am getting the same error

Solution
Now, to fix this error, we need to follow the steps below
- We must first install the ‘NuGet’ package to fix this error.
- Then run the command below; it will deregister and register the repository again.
Register-PSRepository -Default
- Now, run the following line of code to install the Azure PowerShell module. Now you will not get any error this time. This will install the Azure PowerShell module successfully.
if (Get-Module -Name AzureRM -ListAvailable) {
Write-Warning -Message 'Azure module not installed.'
} else {
Install-Module -Name Az -AllowClobber -Scope AllUsers
}See below

- Now, as you can see below, it started installing the Azure PowerShell module successfully. Check out the screenshot below for your reference.
