New-SelfSignedCertificate

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Dave Wyatt Dave Wyatt 3 years, 6 months ago.

  • Author
    Posts
  • #12024
    Profile photo of greg
    greg
    Participant

    I am trying to create a self signed certificate using powershell 3.0 on windows 8 and I keep getting the message:

    New-SelfSignedCertificate : E:\Profile\My Documents\WindowsPowerShell
    At line:1 char:1
    + New-SelfSignedCertificate
    + ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [New-SelfSignedCertificate], InvalidStorePathException
    + FullyQualifiedErrorId : RuntimeException,Microsoft.CertificateServices.Commands.NewSelfSignedCertificateCommand

    I can't find anything on google for InvalidStorePathException

  • #12026
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    According to the documentation on this cmdlet, the "current path" is the default value for the CertStoreLocation parameter. I'm not sure if that means the CurrentLocation on the Cert: drive, or just your current location in general (regardless of which provider owns your current drive.)

    Either way, it's probably best to just pass this value explicitly. For example, to add the certificate to your personal store:

    New-SelfSignedCertificate -DnsName www.fabrikam.com, www.contoso.com -CertStoreLocation cert:\CurrentUser\My
    

You must be logged in to reply to this topic.