windows 2012 server SSL authentication

Hello,

I have followed all the steps in this tutorial: http://www.hurryupandwait.io/blog/certificate-password-less-based-authentication-in-winrm
to setup a passwordless ssl based authentication between a centos 7 local VM (where ansible is installed) and a Windows 10 VM and it works perfectly.
The problem is when I tried to execute the same steps on a Windows 2012 server (the development server) it failed when executing the mapping command:

New-Item -Path WSMan:\localhost\ClientCertifcate -Subject * -Issuer 7C8… -Credential (Get-Credential) -Force

the error indicated that it couldn’t do the mapping because it couldn’t find the certificate in the certificate store (I’m sure that the certificate is in the right place).

please any help, I have been stuck int this step for months now.

Did you make sure the certificate on your Windows 2012 box contains the private key (In Windows it should say something along the lines of “You have a private key for this certificate” or similar).

Thank you for the response,
It was not the issue but It’s fixed now

Great news!
Can you please share what was the problem and how you fixed it - so other people can benefit from it?

Thanks

Sure, It’s kind of stupid,
Windows couldn’t execute the mapping because the current user (the one that generated and installed the self signed cert) does not have the privelege to find the other users certificates.
It was fixed by installing the certificate (the ansible user certificate) globally.