I am trying to create a Windows server with an IIS server that has a web site with client certificate authentication. The client certificates are signed by our own root CA. Because of that we must import that CA into the Trusted Root Authorities at the server. I can successfully import the cert and sometimes the first request to the server succeeds. Unfortunately Windows deletes the CA certs quite quickly and after that the request to the server start failing with 403 errors. I've found the following in the Event Viewer:
Successful auto delete of third-party root certificate:: Subject: Sha1 thumbprint: <"The thumbprint of our cert">.
How do I make Windows stop doing this? The server is running on Amazon EC2 and we want to avoid using a custom AMI. I therefore need to be able to disable this using a script (preferably PowerShell).