Networknet archive Blog

CertUtil: Import a .cer certificate from the command line

Originally published 4 comments

By Ivan Versluis

I use the command-line tool certutil.exe when distributing software packages with Microsoft ConfigMgr 2007 (SCCM). Windows also provides graphical certificate-import options through Internet Explorer and the Certificates snap-in for MMC.

Certutil.exe lets me manage digital certificates from the command line when the graphical tools are not enough for the task.

Certutil.exe is a command-line program that is installed as part of Certificate Services. You can use Certutil.exe to dump and display certification authority (CA) configuration information, configure Certificate Services, back up and restore CA components, and verify certificates, key pairs, and certificate chains..

The example below imports a certificate into the Current User store.

Import a certificate into the Current User store

This example imports a .CER certificate into the Personal folder under “Current User - My User account”:

  1. Open Command Prompt (cmd.exe).
  2. Go to the folder containing the .CER file.
  3. Run the following command:
Code1 line
1
certutil -addstore -user -f "My" "VeriSign Class 3 Code Signing 2010 CA - valid 01-2014.cer"

The certificate has now been imported. In this example, I imported a missing VeriSign code-signing certificate.

Certutil.exe can also import certificates into the Computer account portion and control the certificate’s folder placement.

Reference

4 comments

Comments from the original WordPress site, kept read-only.

  1. matsab

    hi,

    thank you for your post ,

    do you know how to import into approved editors -f "?"

    Best regards,,