If you want to use multi-factor authentication (MFA) to connect to Exchange Online PowerShell, you can't use the instructions at Connect to Exchange Online PowerShell to use remote PowerShell to connect to Exchange Online.

Ok, lets see how it works…

  • Once you’re done and want to disconnect all currently open PowerShell sessions in the current window, run the following command: 

    Get-PSSession | Remove-PSSession