Had the same error for setting up certificate authentication with winrm. Found the issue was because there is a conflicting certificate on the trusted root store. Removed this from the registry key if it exists: Remove-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL -Name ClientAuthTrustMode