I tried to set up powershell remoting on a server and kept getting this error:
Enter-PSSession : Connecting to remote server failed with the following error message : The WinRM client cann ot process the request. It cannot determine the content type of the HTTP response from the destination comput er. The content type is absent or invalid. For more information, see the about_Remote_Troubleshooting Help to pic.
After a bit of troubleshooting I discovered that the problem was that the authentication packets was to big (over 16k), this will cause WinRM to reject the request. The reason for authentication packets getting too big can be because the user is member of very many security groups or in my case because of the SidHistory attribute.
The solution was to increase the MaxFieldLength and MaxRequestBytes keys in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters
If the keys does not exists you can create them, be sure to use the DWORD type.
I sat MaxFieldLength to DEC value 40000 and MaxRequestBytes to DEC value 32768 and rebooted the server. Problem solved.