Problem:
You enable MFA in your organization and now you can’t connect through PowerShell
Solution:
(h/t me)
Referencing the following doc (https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/mfa-connect-to-exchange-online-powershell?view=exchange-ps)
Notes:
- Use Internet Explorer when you download and run the app
- Once you download and install the app, open up PowerShell (admin mode) and run winrm /quickconfig and hit YES
- All PowerShell commands should be run through the new app Microsoft Exchange Online Powershell Module
- When you run
Connect-EXOPSSession -UserPrincipalName chris@contoso.com
you’ll get an error, ignore the error- $UserCredential = Get-Credential
- Import-Module MSOnline
- Connect-MsolService –Credential $UserCredential
This is for the initial setup, subsequently, I’m not sure which steps to go through.