makecert requesting password


Given the following powershell function:

makecert is prompting me to enter the certificate password. From what I understand it wont do this, if the *.pvk file already exists, and has a password set upon it.

SO my question is, how do I split my single makecert command in two separate commands, one to create the *.pvk and another to create the *.cer?

Many Thanks


“Makecert.exe” will always prompt for password when creating a private key.

One way around this prompt may be to write code/macro, to find the password input window and enter your password in it.

The other is to use OpenSSL. In OpenSSL use

to generate a private key with passphrase.

If you do work with certificates a lot, I would recomend to forget “makecert.exe” altogether and use OpenSSL instead.


makecert requesting password by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply