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 https://connect.microsoft.com/site1164/Downloads/DownloadDetails.aspx?DownloadID=59185 but it redirected me to https://docs.microsoft.com/en-us/collaborate/connect-redirect 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

Azure_AD_PS_Module_01

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.

Azure_AD_PS_Module_02

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!
Cheers,

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

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress spam blocked by CleanTalk.