Connect to Exchange Online with PowerShell
- ToddimusPrime
- May 10, 2021
- 1 min read
Here's a quick and easy one to get started. Use this to connect into your tenant's Exchange Online with Powershell. Just make sure to put your UPN on the first line there. This'll work with any MFA policies you have set on your account. Also make sure your account has the appropriate access to manage Exchange Online stuff.
$UPN = "<UPN goes here>"
$MFAExchangeModule = ((Get-ChildItem -Path $($env:LOCALAPPDATA+"\Apps\2.0\") -Filter CreateExoPSSession.ps1 -Recurse ).FullName | Select-Object -Last 1)
. "$MFAExchangeModule"
Connect-EXOPSSession -UserPrincipalName $UPN




Comments