Connect Azure AD (Active Directory) for PowerShell

In order to make use of the PowerShell commands to manage your Azure AD environment you can install the Azure AD module for PowerShell as follows.


Microsoft Azure AD module supported Windows Operating Systems:

  • Windows 7/8/8.1/10/11
  • Windows Server 2008/2012/2012 R2

Steps to install Azure AD for PowerShell

  • Step 1: Open PowerShell, make sure you open it as an administrator.
  • Step 2: To install Azure AD for the PowerShell module run the below command.
    Install-Module AzureAD
  • Step 3: After the module is installed, you would need to connect Azure AD by running the below command,
    You will be prompted to enter your Azure AD Administrator Credentials.
  • Step 4: Once connected, you should see the Azure AD tenant name displayed in the PowerShell prompt.

Test if the connection was successful by running a command like Get-AzureADUser

Azure AD PowerShell module is not compatible with PowerShell 7. For now, it only supports PowerShell 5.1.


Have Questions? Post them here!