No match was found for the specified search criteria and module name ‘AzureAD’

In this azure tutorial, we will discuss how to fix the error, No match was found for the specified search criteria and module name ‘AzureAD’. Try Get-PSRepository to see all available registered module repositories. which comes while trying to install the AzureAD module in PowerShell in Azure.

No match was found for the specified search criteria and module name ‘AzureAD’

I was trying to install the AzureAD module in PowerShell, I got the above error. I was executing the below command to install the AzureAD module in PowerShell.

Install-Module -Name AzureAD
No match was found for the specified search criteria and module name 'AzureAD'

Below is the exact error message.

PackageManagement\Install-Package: No match was found for the specified search criteria and module name ‘AzureAD’. Try Get-PSRepository to see all available registered module
repositories.

At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21

  • … $null = PackageManagement\Install-Package @PSBoundParameters
  • ~~~~~~~~~~~~
    • CategoryInfo : ObjectNotFound: (Microsoft.Power….InstallPackage:InstallPackage) [Install-Package], Exception
    • FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Now to fix this error, follow the below steps

Step-1:

Run the below command first using PowerShell ISE or Windows PowerShell.

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

See here

No match was found for the specified search criteria and module name 'AzureAD'.

Step-2:

Now run the below command to install the AzureAD module. It will install the AzureAD module without any issue.

Install-Module -Name AzureAD
AzureAD No match was found for the specified search criteria

Step-3:

Now you can see the below popup. Click the Yes button.

How to install the AzureAD module using powershell

Step-4:

You can see it’s started progressing installing the AzureAD module.

How to install the AzureAD module using powershell in Azure

You may like following Azure tutorials:

In this Azure tutorial, we discussed how to fix error, AzureAD No match was found for the specified search criteria. Try Get-PSRepository to see all available registered module repositories. I hope it helped you to fix your issue.