I am trying to connect to a remote server using a client certificate for authentication. I tried with the example at "winrm help certmapping" and I can see there is an entry in the mapping table
PS WSMan:\localhost\ClientCertificate> Get-Item -Path WSMan:\localhost\ClientCertificate\ClientCertificate_982856142\*
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\ClientCertificate\ClientCertificate_982856142
Name Value
Type
---- -----
----
URI
http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/* System.String
Subject certadmin
System.String
Issuer 7922C0DB210B050F7C155127B552E4B85C8D5EDD
System.String
UserName certadmin
System.String
Enabled true
System.String
Password
System.String
However when I am trying to connect from the client computer to the remote server I am getting
PS C:\Documents and Settings\certadmin> New-PSSession -computername tokyo.domain.local -CertificateThumbprint $usercertThumbprint
[tokyo.domain.local] Connecting to remote server failed with the following error message : An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client. For more information, see the about_Remote_Troubleshooting
Help topic.
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportException
+ FullyQualifiedErrorId : PSSessionOpenFailed
I am getting the same error even when I try to create a session on the server itself (I've installed the client certificate on the server as well)
Now "about_Remote_Troubleshooting" does not even mention authentication with certificates and I tried hard to find some advice on the net
Any thoughts?
Thanks !


