Connect to O365 v2 (EXO v2)

In order to Connect to O365 (EXO v2) using modern authentication you will need to install and import the EXO v2 module.

***PowerShell needs to have TLS 1.2 enabled in order to run EXO v2***

Run this in PowerShell:   [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Install-Module -Name ExchangeOnlineManagement -Force

If you have this module already installed, then you just need to import it to your current PowerShell session:

Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement

To update the module:

Update-Module -Name ExchangeOnlineManagement



Accounts without MFA enabled:

$UserCredential = Get-Credential

Connect-ExchangeOnline -Credential $UserCredential -ShowProgress $true

Accounts with MFA enabled:

$UserCredential = Get-Credential

Connect-ExchangeOnline -UserPrincipalName -ShowProgress $true

PowerShell Gallery for ExchangeOnlineManagement: