In this blog, you will find out steps to Fix “Get-AzureAdUser : The term ‘Get-AzureAdUser’ is not recognized as the name of a cmdlet, function, script file, or
operable program.” Error.
When you run the Get-AzureAdUser command on a windows PowerShell, this error can occur if the Azure AD module is not installed on that Computer and the PowerShell is not connect to the Azure ad.
If the above is not met, you will see the following error:

Steps to Fix Get-AzureAdUser : The term ‘Get-AzureAdUser’ is not recognized Error:
Open Windows PowerShell as an Administrator:

Run the commands below one by one as seen in the images:
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.
We now have to import the installed module, for that, run the below command:
Import-Module AzureAD

After the above we can run the command to connect to Azure AD.
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, Sign in with an azure admin or global admin account.
Once it authenticates successfully, you should be able to run the command:
Get-AzureAdUser

Date:23/02/2024
Author: Prem
Tags: Fix Get-AzureAdUser : The term ‘Get-AzureAdUser’ is not recognized Error