How to install Azure Active Directory PowerShell Module?

I was working with a client this weekend on Office 365 migration project, during the reporting from their existing test tenant I needed to run few PowerShell cmd I needed to download and install Azure AD PowerShell module. As usual I went to this site but it redirected me to site.

In past I had experience that Connect site is either unavailable or down due to maintenance reason, but this is different. Now what to do to install Azure PowerShell module?

Microsoft has provided another way download and install Azure Active Directory PowerShell module. You can download and install the module directly from PowerShell.
Install-Module -Name Msonline -Verbose –WhatIf


Note: Running –WhatIf will show you what action will be performed once the command is complete.

Now run Install-Module -Name Msonline –Verbose in Windows PowerShell, make sure you are running PowerShell as Administrator.


After installing the module start the PowerShell and run Connect-MsolService and press the Tab key and it will resolve your cmd that means the module is installed and ready to use. Enter your credential and you are ready to Go.

Run the command Get-Module and you will see the list of module installed on your machine. Run Get-Command -Module MSOnline to find the list of commands available with MSOnline module.

Hope it helps!

Posted in:
About the Author

Gulab Prasad

Technology Consultant & Blogger

MCSE: Exchange Server 2016, 2013
MCSE: Skype for Business Server 2015
MCSE: Azure Productivity
MCSE: Windows Server 2016
MCSA: Windows Server 2012, Office 365
MCITP: Exchange Server 2010-2007 | Lync Server 2010
VMware: vSphere 6 Foundations