Pages

Saturday, May 16, 2020

Installing and importing ExchangeOnlineManagement module to connect to Exchange Online with modern authentication

This post serves to quickly demonstrate how to install and import the ExchangeOnlineManagement (Exchange Online PowerShell V2) module to connect to Exchange Online in Microsoft 365 to retrieve data, create new objects, update existing objects, remove objects and configure other Exchange Online features.

Begin by executing the following cmdlet to install the ExchangeOnlineManagement module:

Install-Module -Name ExchangeOnlineManagement

Then use the following cmdlet to import and list the version of the module:

Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement

image

If the displayed version is out of date, the following cmdlet can be executed to update the module:

Update-Module -Name ExchangeOnlineManagement

image

With the ExchangeOnlineManagement module installed proceed to connect to Exchange online with:

Connect-ExchangeOnline

image

The following modern authentication prompt supporting MFA will be displayed:

image

Entering valid administrative credentials will successfully connect you to the tenant:

image

Below is example of modifying an account’s default calendar permissions upon successfully connecting:

image

1 comment:

Anonymous said...

Many thanks, it worked as needed. (Radu)