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
- Start an administrator elevated Powershell prompt.
- Enable Windows PowerShell scripts
Set-ExecutionPolicy RemoteSigned
- Install-Module -Name ExchangeOnlineManagement
Connect to Exchange Online using the EXO V2 module
- open Windows PowerShell, run the following command :
$UserCredential = Get-Credential
- Accounts with MFA enabled
Connect-ExchangeOnline -UserPrincipalName -ShowProgress $true
Update the EXO V2 module
- see the version of the EXO V2 module that’s currently installed
Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement
- Run the following command to update the EXO V2 module
Update-Module -Name ExchangeOnlineManagement
- confirm that the update was successful
Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement
Uninstall the EXO V2 moduleUninstall-Module -Name ExchangeOnlineManagement