Table of Contents
History of Exchange Online PowerShell module releases
Exchange Online PowerShell modules:
- Exchange v1 – this is the original way to connect to Exchange Online PowerShell and it has been used for years. You don’t need to install anything to use it because it is included with PowerShell. This module does not support Modern auth. Once Basic auth is disabled in Exchange Online, this module will permanently stop working.
- Exchange v1 with MFA – this is a version of v1 that does support Modern auth.
- Exchange v2 module (current version 2.0.5) – this module supports Modern auth and MFA and gives you the ability to use 9 very performant cmdlets and all the cmdlets available in v1 modules.
- Pre-release (Preview) Exchange v2 module (current version 2.0.6-Preview6) – preview version of the v2 module that supports Modern auth and enables using Exchange Online cmdlets via REST API calls.
If you are still using the v1 version of the PowerShell module (New-PSSession and Import-PSSsession), it will stop working when Basic auth is turned off for Exchange Online (starting October 1, 2022.)
Upgrade Exchange Online PowerShell Module
1. Get installed Exchange Online PowerShell module. (Open Windows PowerShell as administrator).
PS C:\> Get-InstalledModule ExchangeOnlineManagement Version Name Repository Description ------- ---- ---------- ----------- 1.0.1 ExchangeOnlineManagement PSGallery This is a ...
2. Run this command to uninstall EXO module v1.
Uninstall-Module -Name ExchangeOnlineManagement
3. Run the followings commands to install Exchange Online PowerShell module v2.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force; Install-PackageProvider -Name NuGet -Force; Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted; Install-Module -Name ExchangeOnlineManagement; Import-Module ExchangeOnlineManagement; Connect-ExchangeOnline;
Finally, close then reopen Windows PowerShell window the run the command to check the module was upgraded to v2.
PS C:\> Get-InstalledModule ExchangeOnlineManagement Version Name Repository Description ------- ---- ---------- ----------- 2.0.5 ExchangeOnlineManagement PSGallery This is a...