Install Exchange Online and Azure AD Modules in PowerShell

Managing Exchange Online and Azure Active Directory (Azure AD) from PowerShell requires installing and configuring specific modules. Below is a step-by-step guide to help you install and set up these modules efficiently.

Install Exchange Online Management Module

  • Check for Existing Module:

Get-Module -ListAvailable -Name ExchangeOnlineManagement

  • Install the Module:

Install-Module -Name ExchangeOnlineManagement -Force

  • Update the Module:

Update-Module ExchangeOnlineManagement

  • Connect to Exchange Online:

Connect-ExchangeOnline

  • Set Execution Policy (if required):

Set-ExecutionPolicy RemoteSigned

  • Optional: Uninstall the Module (if needed):

Uninstall-Module -Name ExchangeOnlineManagement


Install Azure AD Module

  • Check for Existing Module:

Get-Module AzureAD -ListAvailable

  • Install the Azure AD Module:

Install-Module -Name AzureAD

  • Update the Azure AD Module:

Update-Module -Name AzureAD


Install MSOnline PowerShell Module (V1)

  • Install the MSOnline Module:

Install-Module -Name MSOnline

  • Connect to the MSOnline Service:

Connect-MsolService

  • Get a List of Users:

Get-MsolUser


By following these steps, you can ensure that the necessary PowerShell modules for managing Exchange Online and Azure AD are correctly installed and up-to-date. This setup is essential for efficient cloud administration tasks.

Leave a Comment