ISSUE: SetLitigationHold step fail during connection to remote server

Last modified:


Overview

During process of leavers migration, user mailbox is set on litigation hold to prevent any data deletion by Microsoft.

Set Litigation Hold workflow step may fail with the folowing error when trying to connect to remote server Outlook.Office365.com

Image 229

Error in the logs:

2023-08-23T09:11:18|ERROR|cpchem  |192.168.150.254|T:79 |PsBaseWrapper             | ||20   |8c746737-ba60-4922-aa41-7d6e57c1cccf| ||Initialization failed for exchadmin@contonso.com|ExchangeOnlineV2
EXCEPTION: System.Management.Automation.RuntimeException: Connecting to remote server outlook.office365.com failed with the following error message : For more information, see the about_Remote_Troubleshooting Help topic. ---> System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server outlook.office365.com failed with the following error message : For more information, see the about_Remote_Troubleshooting Help topic.
at Microsoft.Exchange.Management.ExoPowershellSnapin.NewExoPSSession.HandleError(PSDataCollection`1 errors)
at Microsoft.Exchange.Management.ExoPowershellSnapin.NewExoPSSession.ExecutePsCommand(PSCommand command)
at Microsoft.Exchange.Management.ExoPowershellSnapin.NewExoPSSession.ProcessNewConnection()
at System.Management.Automation.CommandProcessor.ProcessRecord()

Solution

The error is cause because Exchange Online management PowerShell module is not on the version 3 and Microsoft is deprecating v2.


Image 231

Install the ExchangeOnlineManagement powershell V3.
1. Open Powershell as administrator
2. Run this command: Update-Module -Name ExchangeOnlineManagement
3.Confirm module installation

Image 232




    Is this article helpful for you?