This blog post explains how to connect to Azure AD PowerShell by installing the preview edition on the new Azure AD PowerShell Module.

Azure AD PowerShell Module comes in options:

  • MS Online – The original PowerShell Module that was released six years ago and is not being developed anymore.
  • Azure AD – The new version of the original Module that currently being developed but not complete and still in Preview Edition.

The Azure AD Module has 2 two versions at the moment:

  • Azure AD 2.0 – This is the supported and stabled edition.
  • Azure AD Preview – The latest build of the module that has more cmdlets the 2.0 version.

In the following steps, I will show you how to install, update and delete the Azure AD Preview Edition Module

How to install a module

The module Installation can be done on Windows 10, Server 2016 and above without needing to install any prerequisites using the cmdlet below:

Install-module Azure AD Preview -Verbose

connect to azure ad powershell - step 1

Check the module version

Once installed, you can use the cmdlet below to check the version of the module:

Get-Module AzureADpreview-ListAvailable

connect to azure ad powershell - step 2

Inscape allows you to add, edit, and delete users in Azure AD. If you also use AD on-premise make sure you understand if and how your synchronization is setup.

Update the module

You can use cmdlet below which install and update the module to the latest version, by following the steps below:

  1. Install-Module Azure AD Preview
  2. Connect To Azure AD
  3. Once installed, connect to Azure Active Directory using the cmdlet below:

connect to azure ad powershell - step 3

To view all available cmdlet, you will need to type:

Get-Command -Module azureadpreview

connect to azure ad powershell - step 4

And as it stands now, here is the module with 181 cmdlet:

connect to azure ad powershell - step 5

How to uninstall a Module

To delete the module, you will need to use the cmdlet below:

Uninstall-Module azureadpreview

connect to azure ad powershell - step 6

Note: you can only have one Azure AD module installed on a machine, however, you can install Azure AD 2.0 and Azure AD Preview at the same time.

About Azure AD PowerShell Module

Azure AD PowerShell Module allows us to manage: users, groups, applications, domains on Office 365 and Azure using PowerShell.

The main usage of the module is to help us to automate and perform a bulk operation of Office 365 or Microsoft Azure.


Was this article helpful?

Ready to get started?

We hope you found this useful, if you need any support we are here to help.

Get started