Connect PowerShell to Exchange Online / Office 365 / Azure

article #804, updated 13 days ago

Here is a newest method as of right now. There was a warning seen when using a previous method, stating that previous methods will no longer be available fairly soon.

Set-Executionpolicy Bypass -Scope Process 
Install-Module PowerShellGet -Force -AllowClobber
Install-Module ExchangeOnlineManagement -Force -AllowClobber

and then, changing the below appropriately:

Connect-ExchangeOnline -UserPrincipalName