Connecting to Microsoft Exchange Online is very straightforward if you remember the steps. This is just a Quick Step-by-step on how to connect after the initial configurations were done.
If you have not connected to EXO before I suggest you work through the below Articles and install EXO V2
If you connect to different Environments use the below link:
Connect to Exchange Online PowerShell
How to Connect
Open a PowerShell console in Administration Console. Once open use the following command to Connect:
Connect-ExchangeOnline -UserPrincipalName AdminMail@yourdomain.com

This will open a new Window requesting the Administrator Password. This is the same password you log on to the Web console.

Once your password is verified it will take you to the MFA Console where it will request your second Verification.

Once the Connection is done you can run you code required. Once done remember to disconnect the Session.
Disconnect-ExchangeOnline

1 thought on “Connect to Exchange Online PowerShell with MFA”