Windowstechpro.com

Thinking beyond the Limits..

Exchange 2016Exchange OnlineExchange ServerOffice 365

Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send

Issue:

when Testing the Hybrid Connectivity using the below Command,

Test-HybridConnectivity testO365Endpoints

It is failing with the following error,

Resolution:

It is all because TLS, TLS 1.1 and TLS 1.2 not allowed in the server, Which is why the command failed, To resolve the issue, do the following,

Open the Command prompt and run the below command,

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Once the command has completed, Do run the command and validate

You can see it has been completed without any issues.

Tagged:

1 COMMENTS

  1. Even after putting in all the registry keys to enable TLS 1.2 the hybrid config wizard would get error 400 trying to talk to http://office.microsoft.com. When we entered [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 into powershell and re-ran the wizard it worked. This post is the only one that actually had a working solution.

LEAVE A RESPONSE

Your email address will not be published. Required fields are marked *

Related Posts