New-SelfSignedCertificate -CertStoreLocation cannot find path


Using the New-SelfSignedCertificate cmdlet, I want to specify the location on my harddrive as C:\Development\My Project. This command:

gives this error:

Cannot find path ‘Cert:\LocalMachine\Development\My Project’ because
it does not exist.

How do I do this?


The path that you specify for New-SelfSignedCertificate -CertStoreLocation is a certificate store, not a file path. What you will most likely want to do is specify cert:\LocalMachine\my which will create the certificate in your personal store, and then export that certificate to a file on the hard drive if you need it in file form. Something like this should work for that:


New-SelfSignedCertificate -CertStoreLocation cannot find path by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply