Motivation: Making the Systems Engineers life easier.

Connect-ExchangeOnline

M365 (Office 365)

Connect-ExchangeOnline

In order manage your Exchange Online (M365), you need to first connect to your M365 using you Windows PowerShell. After searching multiple blogs and applying multiple scripts, I found the below working seamless for me.

Module: ExchangePowerShell

Applies to: Exchange Online

Connect Exchange Online using Windows PowerShell.

 

  1. From the Windows PowerShell elevated prompt.

         $UserCredential = Get-Credential

 

  1. Enter the M365 Global Admin credentials

 

  1. Run Connect-IPPSSession -Credential $UserCredential

Use the Connect-IPPSSession cmdlet in the Exchange Online PowerShell V2 module to connect to Security & Compliance Center PowerShell or standalone Exchange Online Protection PowerShell using modern authentication. The cmdlet works for MFA or non-MFA enabled accounts.

 

  1. Run Connect-ExchangeOnline -Credential $UserCredential

Use the Connect-ExchangeOnline cmdlet in the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell using modern authentication. This cmdlet works for MFA or non-MFA enabled accounts.

If you face an error in step number 4, you will have to Install EXO V2 module. It is just one single command Install-Module -Name ExchangeOnlineManagement

For Connecting Exchange Online you will have to Install and maintain the EXO V2 module.

You can download the EXO V2 module from the PowerShell gallery at https://www.powershellgallery.com/packages/ExchangeOnlineManagement/

Refer the below snapshot for steps that I had performed to connect my M365 Portal successfully.

Leave your thought here

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Topics