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
===========================================================================
CONNECT TO O365 v2
Accounts without MFA enabled:
$UserCredential = Get-Credential
Connect-ExchangeOnline -Credential $UserCredential -ShowProgress $true
Accounts with MFA enabled:
$UserCredential = Get-Credential
Connect-ExchangeOnline -UserPrincipalName username@cdirad.onmicrosoft.com -ShowProgress $true
PowerShell Gallery for ExchangeOnlineManagement:
https://www.powershellgallery.com/packages/ExchangeOnlineManagement/2.0.3
Got a project that needs expert IT support?
From Linux and Microsoft Server to VMware, networking, and more, our team at CR Tech is here to help.
Get personalized support today and ensure your systems are running at peak performance or make sure that your project turns out to be a successful one!
CONTACT US NOW