Importing pfx certificates
I always struggle to import certificates. But with this commandline-tool (importpfx.exe) it is easy to install them.
———–
Go to http://home.fnal.gov/~jklemenc/dl/importpfx.zip and download importpfx.
Unzip it.
Usage: importpfx.exe -f -p -t USER|MACHINE -s [-r "Subject OU to remove" | -all]
This utility will import a PKCS12 certificate file (with a .p12 or .pfx extension) into the certificate store specified by the -s parameter.
The default behavior is to overwrite like certificates (if available). The -r “Subject OU” will remove all certificates matching the Subject CN
in from the CN in the PKCS12 file and the Subject OU set to the -r parameter.
PARAMETERS:
-f = PKCS12 filename
-p = Password to secure the private key with
-t = Store type (USER or MACHINE)
-s = The certificate store to import into (MY is a common param)
-r “Subject OU Text” = Delete all user certificates in which the Subject OU matches the -r “Subject OU Text” and the Subject CN matches the PKCS12 Subject CN
-r -all = Delete ALL user certificates in the
Import a PKCS12 file into the local machine Testing store and delete any stored certificates with a Subject containing OU=”Self-Signed CA”:
importpfx.exe -f x509.p12 -p “” -t MACHINE -s Testing -r “Self-Signed CA”
Delete ALL certificates in the USER MY store:
importpfx.exe -t USER -s MY -r -all
Examples:
Import a PKCS12 file into the MY store, overwriting if allowed:
importpfx.exe -f clientcert.p12 -p “testpwd” -t USER -s MY
Advantages : Silent install & You don’t have to know the username that is logged in.
source:http://www.symantec.com/connect/forums/install-p12-certificate-silently