Importing .PEM certificates on Windows 7 on the command line

Solution 1:

You need to use certutil.exe instead:

certutil –addstore -enterprise –f "Root" <pathtocertificatefile>

will add the certificate to the Trusted Root Certification Authorities store.

If you want to add an Intermediate Certification Authority, replace Root with CA and to add to your Personal store, change it to My.

All the above adds the certificate to the Local Computer store. To add to the User store remove the -enterprise from the command line:

certutil –addstore –f "Root" <pathtocertificatefile>

The -f in the command simply forces an overwrite in the case where the certificate is already installed.