Importing Multiple Certificates

Through a recent migration we needed to move a large number of SSL certificates. After spending a lot of time exporting through the GUI we really did not feel like importing them by hand too. CertUtil came in hand to help us


CertUtil.exe -importPFX domain.com-YYMMDD.pfx "NoExport,AT_KEYEXCHANGE" < keypassword.txt

The bonus is being able to pipe in the certificate password from a text file to save typing it for each time it is executed. As of Service Pack 1 on Windows Server 2003 you can mark the private key as non-exportable.

Comments Subscribe to Post Comments Feed

Pepe said:

Very nice command. I am in a similar situation, migrating a lot of PCs, with several of them having up to 50 certificates. Do you know about any command to export the certificates + key into PFX files, to make a batch file with it?

I am searching all the web, and the Microsoft's documentation, without any luck!

Have Your Say