![]() Import-Module $(( Get-ChildItem -Path $( $env:LOCALAPPDATA + “Apps2.0”) -Filter .dll -Recurse ). $UPN = Read-Host “Enter the UPN of the user you want to connect with” Write-Host “Connecting to Exchange Online” -ForegroundColor Green If you’re using my other script or something like it, you don’t need many changes – I’ve basically updated it to prompt for the UPN you want to connect with, and then import the Exchange Online Modern Auth enabled module: The only thing it doesn’t do (which I ALWAYS want) is load natively in PowerShell ISE – so I recently sat down and updated my connection script to load the MFA module so that I could keep scripting the way I normally do. Thankfully, Microsoft has released a new PowerShell module for connecting to Exchange Online – works great, keeps itself updated, is able to do a bunch of different connections… what’s not to love? I’ve been using my Exchange Online connection script for some time now, and I love it – however, one of the biggest failings of that PowerShell module is that it doesn’t support MFA, which is becoming more common as a requirement as we go along.
0 Comments
Leave a Reply. |