CONNECTING TO REMOTE SERVER FAILED WITH THE FOLLOWING ERROR MESSAGE THE WINRM CLIENT RECEIVED AN HTTP STATUS 307

This article has been tested and applied to a Windows Server 2012 R2 running  Exchange 2013. We also use Office 365 with Exchange Hybrid Configuration Wizard.

Days ago I faced an issue which I received error HTTP 307 when trying to user Office 365 Hybrid Wizard.

The error was:

Updating hybrid configuration failed with error ‘Microsoft.Exchange.Management.Hybrid.CouldNotCreateOnPremisSessionException: Could not create On-Premisses Session: Could not open Remote Powershell Runspace: Connecting to remote server failed with the following error message: The WSMan client cannot process the requests. Proxy is not supported under HTTP transport. Change the transport to HTTPS and specify a valid proxy information and try again.

CONNECTING TO REMOTE SERVER FAILED WITH THE FOLLOWING ERROR MESSAGE THE WINRM CLIENT RECEIVED AN HTTP STATUS 307

Cause:

There was a proxy defined in Windows server, which caused PowerShell to switch the communication protocol from HTTP to HTTPS

Solution:

Go to Start – Cmd and run it as administrator then follow the commands bellow

First use the command bellow to see the proxy and write it down.:

 netsh winhttp show proxy 

Secondly, reset proxy to no proxy setting so you can continue with the setup:

netsh winhttp reset proxy