A great blog post about Exchange Online PowerShell and MFA

By | 2019-04-11

I’ve been extending my personal scripts for simplifying my daily workflows operating with Exchange Online, and keep going back to a really interesting and useful blog post by Ingo Gegenwarth where he delves deep into how the powershell module for exchange online working with multi-factor authentication. Definitely worth a read!

If you don’t have time to read it, a helpful takeaway from the post is this one-liner to import the EXO module properly:

Import-Module (Get-ChildItem -Path $($env:LOCALAPPDATA+"\Apps\2.0\") -Filter '*ExoPowershellModule.dll' -Recurse | Foreach{(Get-ChildItem -Path $_.Directory -Filter CreateExoPSSession.ps1)} | Sort-Object LastWriteTime | Select-Object -Last 1).FullName