How to connect to Exchange Online PowerShell using modern authentication with MFA


From PowerShell:


Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline

Pick an account:



Once authenticated you can close the browser window and return to PowerShell.



When finished, disconnect:


Disconnect-ExchangeOnline