In this blog, you will find out steps to Fix The term ‘Connect-AzureAD’ is not recognized Error.
When you are trying to connect to the Azure AD using your windows PowerShell, this error can occur if the Azure AD module is not installed on that Computer.
In order to successfully connect to the Azure AD with the PowerShell, we will first have to install the required Azure AD module.
Steps to Fix The term ‘Connect-AzureAD’ is not recognized Error:
Open Windows PowerShell as an Administrator, on a computer on which you would like to install the Azure AD module:
To be able to install the Module, we will have to first Set the execution policy by running the below command:
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
It will ask for your confirmation, type “A” as shown above and hit enter. This will make the changes on the current logged in user level.
We can now install the Azure AD module using the command below:
Install-Module -Name AzureAD -Force
Using the -Force parameter makes sure that the latest version of the module get installed.
Now to import the installed module, run the below command:
Import-Module AzureAD
Now we can run the command to connect to Azure AD using the PowerShell.
To connect to Azure AD using Windows PowerShell run:
Connect-AzureAD
After you run the command, it will prompt you to sign in with the admin account, once you are signed in, you can run the Azure AD PowerShell commands.
Related Links
How to Connect to Azure Ad using PowerShell | How to Connect to Compliance Admin Center using PowerShell | How to Connect to Teams Online using PowerShell | How to Connect to Microsoft 365 Admin Center using PowerShell | How to Connect to SharePoint Online using PowerShell | How to connect to Exchange Online using PowerShell in Office 365
Date:22/09/2023
Author: Prem
Tags: Fix The term ‘Connect-AzureAD’ is not recognized as the name of a cmdlet Error