If you want to use multi-factor authentication (MFA) to connect to Exchange Online PowerShell, Microsoft states you are required to install the Exchange Online Remote PowerShell Module, and use the Connect-EXOPSSession cmdlet to connect.
To download this, you need to go to the Exchange Admin Center (EAC) for your Exchange Online organization.
- Head to Microsoft 365 Admin centre https://admin.microsoft.com for your tenant and sign in.
- In the left hand navigation, expand out Admin Centers and select Exchange
- A new tab opens and loads up the Exchange admin center.
- In the navigation select Hybrid, and then click the second configuration button.
- This downloads and runs Microsoft.Online.CSE.PSModule.Client.application.
It was at this point I got an error message stated, “Application cannot be started Contact the application vendor.”
From clicking on the Details under summary email it stated: “Deployment and application do not have matching security zones.”
The problem here, is that, it is trying to run a click-once application. This only works in IE/Edge. I was accessing the EAC through chrome. Therefore, log into your tenant again using Edge or IE.
- Once loaded, you will find Microsoft Exchange Online PowerShell available in your Windows 10 menu. Also, a PowerShell window will open ready for you to connect to Exchange online using PowerShell.
Connect-EXOPSSession -UserPrincipalName <your UPN>
Summary: When downloading the Microsoft Exchange Online PowerShell from the Microsoft Exchange Admin centre, ensure you have logged in using IE or Edge.