Problem:The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer
When searching for an on-premise Exchange server, I got the following error message:
[Server FQDN] Connecting to remote server failed with the following error message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer. The content type is absent or invalid. For more information, see the about_Remote_Troubleshooting Help topic. It was running the command 'Discover-ExchangeServer -UseWIA $true -SuppressError $true'
This article shows how I applied some troubleshooting to get to the final solution.
And this are the troubleshooting steps:
Verified wsman and kerbauth module is showing up in native mode on powershell virtual directory.
Verified wsman and kerbauth module is not loaded on Default Web site level.
Verified wsman and kerbauth module is present in global modules section of the C:\Windows\System32\Inetsrv\config\ApplicationHost.config file
Executed winrm quickconfig in windows powershell.
Found event 1310 in event viewer:
Event code: 3008
Event message: A configuration error has occurred.
Event time: 7/27/2013 2:23:38 PM
Event time (UTC): 7/27/2013 6:23:38 PM
Event ID: 52f43ae457714d149a37fd917a7e4d7b
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application domain: /LM/W3SVC/1/ROOT/PowerShell-6-130194230185386634
Trust level: Full
Application Virtual Path: /PowerShell
Application Path: C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\PowerShell
using IE and got error "Exception message: Could not load file or assembly 'System.ServiceModel.Web, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Also there is a line which says LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/powershell/ebdf2249/a374cb9/System.ServiceModel.Web.DLL
Discovered that the file System.ServiceModel.Web.DLL is missing on the server.
Verified the System.ServiceModel.Web.DLL is missing in C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5 and C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\powershell\ebdf2249\a374cb9
Copied System.ServiceModel.Web.DLL from other server to both the folders.
After having done that, EMC and EMS started working.