Install-packageprovider no match was found for the specified search criteria for the provider ‘nuget’

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.

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
install-packageprovider no match was found for the specified search criteria

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
install-packageprovider no match was found for the specified search criteria for the provider 'nuget

Step-3:

Now install the NuGet package using the below command.

Install-PackageProvider -Name NuGet
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
install-packageprovider no match was found nuget

Step-5:

The below popup will appear, you can click on the Yes button.

install-packageprovider no match was found for the specified search criteria nuget

Step-6:

Now you can see the installation of the module has started without any issues.

iinstall-packageprovider no match was found

You may like the following Azure tutorials:

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.

4 thoughts on “Install-packageprovider no match was found for the specified search criteria for the provider ‘nuget’”

  1. 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.

Comments are closed.