Backup of a Windows CA Configuration 2

In a previous post, I’ve blogged about how to install a Windows root CA, and we did a lot of customization. Let’s see how we can save this configuration using an handy script. What is a backup of a Windows CA Configuration made of?

You may also notice that this script backs up sensitive information which is not always found in the system state you would think it helps you restore everything.

Most commands here are self explanatory:

  • First command backs up the Certificate database where all issued, revoked certificates are present
  • The second one backs up the private key of the CA. Please note that the system state doesn’t back it up if you don’t apply a hotfix on Windows 2008 R2 as mentioned in this article. Of course, if you are using a HSM module, this step is not needed and won’t work.
  • The two next commands backup the parameters found in the registry we modified when installing our CA. THe first commands uses the certutil readable format, the second one helps you have an handy registry file to import elsewhere.
  • Then we backup the templates we have created and issued
  • Finally additional info is stored so when we restore we can compare if we are good to go.

Please note that when restoring, you have to stop the certsvc service and start it again when the modifications are done.

Some of you may object there is a backup command with certutil but it lacks some of the human readable info outlined here


Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 thoughts on “Backup of a Windows CA Configuration