New-SelfSignedCertificate

Welcome Forums General PowerShell Q&A New-SelfSignedCertificate

This topic contains 1 reply, has 2 voices, and was last updated by

 
Member
4 years, 12 months ago.

  • Author
    Posts
  • #12024

    Participant
    Points: 0
    Rank: Member

    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

    Member
    Points: 0
    Rank: Member

    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
    

The topic ‘New-SelfSignedCertificate’ is closed to new replies.