Azure AD PowerShell module installation got easier

Azure AD PowerShell module installation got easier

Azure AD PowerShell module was earlier installed by a standard .msi package. Now you can install it using one PowerShell command. However, installation requires PowerShell 5 or newer.

Before you begin

Module installation requires PowerShell 5 or later which is included in Windows 10 & Server 2016. If you have previous version of Windows, you need to install Windows Management Framework 5.1 here.

Installing the Azure AD PowerShell module

To install the latest Azure AD PowerShell module, enter the following commands as an administrator.

Azure AD PowerShell v1 (MsOnline)

# Install the MsOnline module
Install-Module MSOnline

If you haven’t used the Install-Module command earlier, you might not have NuGet provider. Just click the Yes to continue.

alt text

You might also get the following error message stating that PSGallery is untrusted. This is okay so you may safely click the yes button.

alt text

Now you are ready to connect to Office 365!

Connect-MsolService

Azure AD PowerShell v2 (AzureAD)

# Install the AzureAD module
Install-Module AzureAD

Now you are ready to connect to Office 365!

Connect-AzureAD

Azure AD PowerShell v2 preview (AzureADPreview)

Note! AzureAD Preview has same commands than AzureAD, only the module name is different. Therefore, they cannot be installed in the same computer together.

# Install the AzureAD module
Install-Module AzureADPreview

Now you are ready to connect to Office 365!

Connect-AzureAD
Dr Nestori Syynimaa avatar
About Dr Nestori Syynimaa
Dr Syynimaa works as a CIO of eight cities and municipalities surrounding Tampere, the largest inland city in Nordic countries. He also runs his own consultation business Gerenios. Before moving to his current position, Dr Syynimaa worked as a consultant, trainer, and university lecturer for almost 20 years. He is a regular speaker on Office 365 and Azure security in scientific and professional conferences. Dr Syynimaa holds MCSA (Office 365) and is Microsoft Certified Trainer.
comments powered by Disqus