Exchange Online PowerShell V2

The Exchange Online PowerShell V2 module also known as EXO V2 enables admins to connect to the Exchange Online environment to retrieve data, create new objects, update existing objects, remove objects as well as configure Exchange Online and its features.

The EXO V2 module use Modern authentication for all cmdlets. You can’t use Basic authentication in the EXO V2 module

The new cmdlets in the EXO V2 module are meant to replace their older, less efficient equivalents.

Install and the Exchange Online PowerShell V2 module.

WinRM needs to allow Basic authentication (it’s enabled by default).
You must temporarily enable WinRM to run the following commands. You can enable it by running “winrm quickconfig”.

winrm get winrm/config/client/auth

If you don't see the value Basic = true, you need to run this command to enable Basic authentication for WinRM

winrm set winrm/config/client/auth @{Basic="true"}

Install the EXO V2 module

  1. Start an administrator elevated Powershell prompt.
  2. Enable Windows PowerShell scripts
    Set-ExecutionPolicy RemoteSigned
  3. Install-Module -Name ExchangeOnlineManagement

Connect to Exchange Online using the EXO V2 module

  1. open Windows PowerShell, run the following command :
    $UserCredential = Get-Credential
  2. Accounts with MFA enabled
    Connect-ExchangeOnline -UserPrincipalName -ShowProgress $true

Update the EXO V2 module

  1. see the version of the EXO V2 module that’s currently installed
    Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement
  2. Run the following command to update the EXO V2 module
    Update-Module -Name ExchangeOnlineManagement
  3. confirm that the update was successful
    Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement

Uninstall the EXO V2 module
Uninstall-Module -Name ExchangeOnlineManagement

Leave a Reply

Your email address will not be published. Required fields are marked *