Is it possible to Install an SSL Certificate in Windows Server 2008 R2 using powershell?

If it's not, is it possible with cmd command line?

I am doing it with mmc now but would it be nice to do that with PowerShell.

2 Answers 2


You can use certutil.exe. The exact syntax varies based on the the certificate file format (.cer, .pfx...), but one of these options should be able to do the trick:

certutil -addstore my <filename>
certutil -installcert <filename>
certutil -importcert <filename>
certutil -importpfx <filename>

More info here: http://technet.microsoft.com/en-us/library/cc772898(WS.10).aspx.

This also can be done in native PowerShell, but it's a lot more complex, as there is no built-in command for certificate management, so you have to use the .NET X.509 library (System.Security.Cryptography.X509Certificates).

  • thanks for the info. Today, I was exporting SSLs from win server 2003 and importing them into win server 2008 r2. is this certutil.exe utility from microsoft? any resource you can recommend for me to go over?
    – tugberk
    Jul 9, 2011 at 11:39
  • Yes, it's a built-in tool in Windows systems; for detailed syntax, see the link I added to the answer.
    – Massimo
    Jul 9, 2011 at 11:45

No time for a sf.com-quality answer, but someone please feel free to improve it, thankyou

Public Key Infrastructure PowerShell module

PowerShell Certificate Provider

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.