How to import a certificate into the Local USER’s store

If your .CER certificate contains a private key, you can only import it through the MMC console.
Neither the certutil nor the Import-Certificate cmdlet keeps the private key during the import process.
The Import-PfxCertificate cmdlet keeps the private key, but it does not import .CER certificates.

Import the certificate with Certutil

The following command line assumes that you are already inside the folder containing the certificate.
Otherwise,,provide the path to the certificate file.

certutil -addstore -user -f "My" "MyCertificate.cer"

The key point here is the -user parameter. Without this parameter, the certificate is imported into the Local Computer‘s store instead of the Local User‘s store.

Import the certificate with Powershell

Import a .CER certificate

Import-Certificate -FilePath .\Certificate.cer -CertStoreLocation Cert:\CurrentUser\My

Import a .PFX certificate

Import-PfxCertificate -FilePath .\Certificate.cer -CertStoreLocation Cert:\CurrentUser\My

Import a certificate through the console

  1. In a command line type certmgr
  2. Expand Certificates – Current User \ Personal \ Certificates (if this folder already exists)
  3. Right-click the Personal folder, select All tasks and Import…
    Current User Personal Certificates folder
  4. Type the file name or click Browse and select the certificate you want to import.
  5. Select Place all certificates in the following store and use Personal as
    Certificate store.
    Select the personal store

More about

(Microsoft Technet)

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s