The Attempt To Connect To Powershell Using Kerberos Authentication Failed The WinRM Client Received An Http Server Error Status (500)

When you launch the EMC you see either the message The WinRM Client Received An Http Server Error Status (500) or The attempt to connect to http://server.domainname.com/powershell using “kerberos” authentication failed:Connecting to remote server failed with the following message:The WinRm client cannot process the request.It cannot determine the content type pf tje HTTP response from the destination computer. The content type is absent or invalid