When trying to connect to exchange online, it can sometimes be hard to find the correct up to date steps. Even Microsoft’s site can be confusing and not clear on which steps are needed. Below is a simple walk through to get you from start to finish. I am completing these on windows 11.
- Go to the start menu and search for powershell, then select “Run as Administrator”
- Run the command Install-Module -Name ExchangeOnlineManagement to install the correct module
- Run the command Import-Module ExchangeOnlineManagement to import that module for use
- Then run the command Connect-ExchangeOnline -UserPrincipalName <UPN> to connect to your exchange online tenant. Replace the <UPN> with your global admin username
- You will then be asked for your password and 2FA to authenticate
- You should now be logged in and ready to run commands