[Solved] The term ‘Get-MsolUser’ is not recognized as the name of a cmdlet

In this tutorial, we will discuss how to fix the error, The term ‘Get-MsolUser’ is not recognized as the name of a cmdlet.

The above error comes while working with Office 365 users from PowerShell. The complete error message comes as 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.

The term ‘Get-MsolUser’ is not recognized as the name of a cmdlet

The error comes while executing the Get-MsolUser Azure AD PowerShell command to fetch Office 365 users.

Follow the below steps to fix the issue.

Step-1:

Download and install the Microsoft Online Services Sign-In Assistant for IT Professionals RTW from this MSDN URL. The Microsoft Online Services Sign-In Assistant provides end-user sign-in capabilities to Microsoft Online Services, such as Office 365.

Once the installation is over, you can verify in the control panel.

Step-2:

Then Open Windows PowerShell in administrator mode and run the following command.

Install-Module MSOnline -Force

Step-3:

Now you can run the below command,

Connect-MsolService

Once you run the above command, it will ask you to enter the credentials, make sure to enter the global Office 365 admin account.

You may like the following PowerShell article:

Conclusion

This article we learned how to solved the error, The term ‘Get-MsolUser’ is not recognized as the name of a cmdlet.

>