Upgrade Exchange Online PowerShell Module or Install Exchange Online PowerShell Preview

Table of Contents

Exchange Online PowerShell Module

Version 2.0.6-Preview6 of the EXO V2 module is now available. This Preview version improves upon the historical capabilities of the module with the following features:

  • Version 2.0.6 includes cmdlets that are backed by the REST API:
    • REST API cmdlets don’t rely on the remote PowerShell session, so PowerShell on your client computer doesn’t need Basic authentication in WinRM.
    • REST API cmdlets work just like their remote PowerShell equivalents, so you don’t need to update any of your scripts.
    • Virtually all of the available remote PowerShell cmdlets are now backed by the REST API. Some cmdlets might temporarily appear or disappear from availability using the REST API as we find and fix issues.
  • The UseRPSSession switch in Connect-ExchangeOnline grants access to all existing remote PowerShell cmdlets as before:

    • The UseRPSSession switch requires Basic authentication in WinRM on your client computer.
    • If you don’t use the UseRPSSession switch when you connect, you can use only the REST API cmdlets.
  • A few REST API cmdlets have been updated with the experimental UseCustomRouting switch. This switch routes the command directly to the required Mailbox server, and might improve overall performance.

Update Exchange Online PowerShell Module

1. Get installed Exchange Online PowerShell module. In this computer, version 2.0.5 of EXO module is installed.

PS C:\> Get-InstalledModule ExchangeOnlineManagement

Version              Name                                Repository           Description
-------              ----                                ----------           -----------
2.0.5                ExchangeOnlineManagement            PSGallery            This is a General Availability (GA) re...

2. Run this command to uninstall EXO module version 2.0.5

Uninstall-Module -Name ExchangeOnlineManagement

3. Install newest version (Preview) of EXO module using the following command:

Install-Module -Name ExchangeOnlineManagement -AllowPrerelease

Note: If you get this error: Install-Module : A parameter cannot be found that matches parameter name ‘AllowPrerelease’. Please read this article Fix Install-Module : A Parameter Cannot be Found that Matches Parameter Name AllowPrerelease 

PS C:\> Get-InstalledModule ExchangeOnlineManagement

Version              Name                                Repository           Description
-------              ----                                ----------           -----------
2.0.6-Preview6       ExchangeOnlineManagement            PSGallery            This is a Public Preview release of Ex...

Install preview module side-by-side with old version

In some cases, you don’t want to remove the old version of EXO module, you can install preview release side-by-side with the old one.

If you using this command Install-Module -Name ExchangeOnlineManagement -AllowPrerelease. You would get the below warning.

Note

WARNING: Version ‘2.0.5’ of module ‘ExchangeOnlineManagement’ is already installed at ‘C:Program FilesWindowsPowerShellModulesExchangeOnlineManagement2.0.5’. To install version ‘2.0.6-Preview6’, run Install-Module and add the -Force parameter, this command will install version ‘2.0.6-Preview6’ side-by-side with version ‘2.0.5’.

Let add –Force parameter to install preview release side-by-side.

Install-Module -Name ExchangeOnlineManagement -AllowPrerelease -Force

Connect to Exchange Online PowerShell

Note: Only 229 EXO cmdlets have been converted to use REST API in this version. If you disable WinRM basic authentication, you can access only 229 EXO cmdlets; other RPS cmdlets will not work without WinRM basic authentication.

To use all the cmdlets via a Remote PowerShell connection, you need to pass the UseRPSSession parameter while running Connect-ExchangeOnline.

Connect-ExchangeOnline –UseRPSSession

Leave a Comment

Required fields are marked *