Importing Modern Authentication Exchange Online powershell module into Powershell

Prereq: In the Exchange Admin Console, go to Hybrid > Setup and click the appropriate Configure button to download the Exchange Online Remote PowerShell Module for multi-factor authentication.

  
Import-Module $((Get-ChildItem -Path $($env:LOCALAPPDATA+"\Apps\2.0\") -Filter Microsoft.Exchange.Management.ExoPowershellModule.dll -Recurse ).FullName|?{$_ -notmatch "_none_"}|select -First 1)  
$EXOSession = New-ExoPSSession -UserPrincipalName username@company.onmicrosoft.com
Import-PSSession $EXOSession