In this azure tutorial, we will discuss how to fix the error, 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. which comes while trying to install the MSOnline module in PowerShell in Azure.
Table of Contents
Install-packageprovider no match was found for the specified search criteria nuget
I was trying to install the MSOnline module in PowerShell, I got the above error. I was executing the below command to install the MSOnline module in PowerShell.
Install-Module -Name MSOnline
Here is the exact error what i got
PackageManagement\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 C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7468 char:21
- … $null = PackageManagement\Install-PackageProvider -Name $script:N …
~~~~~~~~~~~~~- CategoryInfo : InvalidArgument: (Microsoft.Power…PackageProvider:InstallPackageProvider) [Install-PackageProvider], Exception
- FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackageProvider
- The ‘New-AzResourceGroup’ command was found in the module ‘Az.Resources’, but the module could not be loaded
- Powershell error – Az.Resources.psm1 cannot be loaded because running scripts is disabled on this system

Now Let’s try to fix it, To fix it follow the below steps or you can refer Unable to find package providers (NuGet)
Step- 1:
Open your Powershell ISE in Run as administrator mode.
Step-2:
Run the below line of command
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Step-3:
Now install the NuGet package using the below command.
Install-PackageProvider -Name NuGet

If you can see above, the Nuget package got installed successfully without any issues.
Step-4:
Now let’s try to install the MSOnline module in PowerShell. Use the below command to do so.
Install-Module -Name MSOnline

Step-5:
The below popup will appear, you can click on the Yes button.

Step-6:
Now you can see the installation of the module has started without any issues.

You may like the following Azure tutorials:
- How to create and add members to Azure Active Directory Group
- The term ‘get-azureadgroup’ is not recognized as the name of a cmdlet
- No match was found for the specified search criteria and module name ‘AzureAD’
- Troubleshooting specific RDP error messages in Azure
Wrapping Up
In this Azure tutorial, we discussed how to fix the error, 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. I hope it helped you to fix your issue.
Thank you for sharing. I was hitting the exact same problem: the machine configuration blocked TLS 1.1 connections, and forcing TLS 1.2 allowed the connection. In my case I did not have to run that command from an elevated admin shell window.
Thank you. This is perfect and worked like a charm.
…in like Flint — Thanks ALOT!
Awesome. Just what did the trick for us non-PowerShell guys.