Monday, 26 March 2012

Automated SSL Certificate Import (Certutil)

Just a quick script drop.  You can use this script to import SSL certificates.  It will import all the the PFX files in the directory to your COMPUTER\Personal\ Store.  Which is the required store for your SSL Certificates.  It does not import intermediate or CA certificates.  I might add that functionality one day.  Any questions post a comment below:


  1. Create a Directory called "SSL" (or something like that)
  2. Drop all your PFX files into the SSL folder
  3. Create a Batch File "InstallCert.bat" 
  4. Run a command prompt as administrator
  5. Change Directory to your batch file and run it
Batch File Contents


set CURDIR=%CD%
for /f "usebackq delims=|" %%f in (`dir /b "%CURDIR%" ^| findstr /i pfx`) do certutil.exe -f -p <PFX File Password> -importpfx "%CURDIR%\%%f"
pause

No comments:

Post a Comment