Networknet archive Blog

CertUtil: Import a .cer certificate from the command line

Originally published 4 comments

Windows provides several ways to import certificates: the Certificates snap-in for MMC, Internet Explorer and the command-line tool certutil.exe.

Certutil.exe lets you manage digital certificates from the command line.

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 graphical tools are enough in many cases, but some tasks need a command-line tool. I use certutil.exe when distributing software packages with Microsoft ConfigMgr 2007 (SCCM).

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,,