ISSUE: Create Hybrid Archive Mailbox fails with error 'WinRM cannot complete the operation'

Last modified:


Overview

The error below occurs during the Create Hybrid Archive Mailbox. 


Image 156


$HYBRID_CreateArchiveMailbox: An error occurred during Exchange OnPrem Powershell | Failed to establish the connection to Exchange Powershell. Error msg: [ex03] Connecting to remote server ex03 failed with the following error message : WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote computers within the same local subnet. For more information, see the about_Remote_Troubleshooting Help topic. [ProcessResult]


Solution


There are 2 possible reasons for this. 


1. A GPO is resetting the WINRM Basic Authentication configuration. This is a pre-requisite step for EVComplete to function properly.  On the Bridgehead server, confirm the following has been set and is not being reset via GPO. 

From command line (not Powershell)

winrm quickconfig

winrm set winrm/config/client/auth ‘@{Basic="true"}’


2. The other issue could be connectivity between the source and M365.  Below are some troubleshooting tips. 

Run the following powershell command. 

$creds = get-credential -username "global_admin_user@domain.onmicrosoft.com" -message "Credentials"
$session = new-pssession -ConfigurationName Microsoft.Exchange -ConnectionURI https://outlook.office365.com/powershell-liveid/ -Credential $creds -authentication Basic -AllowRedirection


If the below message is the result, continue below. 

WARNING: Your connection has been redirected to the following URI: "https://ps.outlook.com/PowerShell-LiveID?PSVersion=4.0 "


Now run:  import-pssession $session get-mailbox

This also may fail if a connection to ps.outlook.com cannot be made.  This is an indication of a networking issue within the environment.  It might be useful to refer to the EVComplete pre-reqs guide for additional networking steps that should be revisited. If you require a copy, please request it from your consultant.  

Is this article helpful for you?