Fix “Connect-AzureAD : The term ‘Connect-AzureAD’ is not recognized as the name of a cmdlet, function, script file, or operable program.” Error

Problem: When trying to connect to Azure AD from PowerShell, using: “Connect-AzureAD” cmdlet, received an error: “Connect-AzureAD: The term ‘Connect-AzureAD’ is not recognized as the name of a cmdlet, function, script file, or operable program.”

Connect-AzureAD The term Connect-AzureAD is not recognized as the name of a cmdlet, function, script file, or operable program

Solution for Connect-AzureAD not recognized Issue:

Install the Azure AD Module!

  1. Open PowerShell as an administrator, Enter:
    Install-Module AzureAD
    
  2. Confirm the installation by entering “A” – Yes to All.
install azure AD module in powershell

A similar error “Get-MsolUser : The term “Get-MsolUser” is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.” may occur when you try to execute the cmdlet from Azure AD PowerShell Module V1, and you got to install the MSOnline module to resolve.

Installing PowerShell module to connect to Azure AD Office 365 is here: How to Connect to Azure AD using PowerShell?

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

Your email address will not be published.