
Goodbye RPS: Remote PowerShell Retirement in Exchange Online
Exchange Online PowerShell uses Remote PowerShell to connect to Exchange Online tenant and perform various management tasks such as creating and managing mailboxes, automating tasks, creating reports, performing bulk operations on multiple accounts, and configuring various settings.
Recently Microsoft made announcement regarding deprecation of Remote PowerShell (RPS) in Exchange Online. Starting from June 1, 2023, Microsoft will begin phasing out the use of Remote PowerShell (RPS) for Exchange Online, with a complete cut-off on July 1, 2023.
How to Identify the Usage Remote PowerShell?
If you are using any of the below methods, you are utilizing Remote PowerShell.
- Exchange session creation using New-PSSession
- Connect to Exchange Online PowerShell using Connect-ExoPSSession (EXO V1 module)
- Usage of Exchange Online PowerShell V2 module
- Using –UseRPSSession parameter
How to Remove RPS in Exchange Online PowerShell?
Admins can adopt the below alternatives to avoid the usage of RPS.
- If you are using the New-PSSession or Connect-EXOPSSession to connect Exchange Online PowerShell, install EXO V3 module and use the Connect-ExchangeOnline cmdlet.
- Avoid using Connect-ExchangeOnline cmdlet with –UseRPSSession parameter and use REST API cmdlets.
How to Update Exchange Online PowerShell Module?
By using Exchange Online PowerShell V3 (EXO V3) module, admins can mitigate the effects of RPS retirement.
To check the current version of EXO module, run the following cmdlet.
Get-InstalledModule ExchangeOnlineManagement
In the above example, EXO V2 module is installed. To upgrade the Exchange Online PowerShell module to V3, run the below cmdlet.
Update-Module -Name ExchangeOnlineManagement
In the above image, Exo V2 module updated to the EXO V3 module.
If you haven’t installed Exchange Online Management module earlier, you can install the latest EXO module using the following cmdlet.
Install-Module –Name ExchangeOnlineManagement
To precise, if you want to install a specific version, you can pass it in the –RequiredVersion parameter. For example,
Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.0.0
Will RPS Retirement Affect Security & Compliance PowerShell?
The Connect-IPPSSession cmdlet in the Exchange Online module is used to establish a connection to the Security and Compliance PowerShell. Even though the RPS-based connection will be deprecated in the future, the Connect-IPPSSession cmdlet and all other cmdlets in Security & Compliance PowerShell will continue to rely on RPS-based connections and will not be impacted by the RPS deprecation.
Microsoft is currently working on developing REST-based cmdlets for Connect-IPPSSession and they will be released in the near future.
Conclusion:
Many administrators are already facing challenges in migrating from Azure AD and MSOL modules to Microsoft Graph PowerShell, the retirement of RPS has a positive aspect. The REST API cmdlets for Exchange Online PowerShell are identical to the existing RPS-based cmdlets, which means that administrators do not need to update the cmdlets in their existing scripts. They only need to update the module, making the transition less complex and less time-consuming.
To learn more about the upcoming deprecations in Office 365 and how to stay ahead of the curve, be sure to check out the in-depth blog at 2023 End-of-support milestones in Office 365.