New-SelfSignedCertificateEx RRS feed

  • Question

  • Hello,

    I need to know how to use this script on my development environment: Windows 7 Pro, PSISE v2.0 (per $PSVersionTable.PSVersion) to create a self signed certificate that is compatible with Chrome 63.

    I'm running PS as Administrator used this Command Line:

    New-SelfSignedCertificateEx `
    -Subject "CN=my.localsite.test" `
    -EKU "Server Authentication", "Client Authentication" ` 
    -KU "KeyEncipherment, DigitalSignature, DataEncipherment" `
    -SAN "my.localsite.test","" `
    -AllowSMIME -Path C:\MyPathTo\Desktop\localsite.pfx `
    -Password (ConvertTo-SecureString "123" -AsPlainText -Force) ` 

    I'm getting this error:

    Exception calling "Create" with "0" argument(s): "CertEnroll::CX509PrivateKey::Create: Cannot fi
    nd object or property. 0x80092004 (-2146885628)"
    At C:\Test\Downloads\New-SelfSignedCertificateEx\New-SelfSignedCertificateEx.ps1:224 char
    + 	$PrivateKey.Create <<<< ()
        + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
        + FullyQualifiedErrorId : ComMethodTargetInvocation
    I'm trying to create a SSC for web development on IIS 7.5 on the above system.  IIS 7.5 has the ability to create a SSC but not with SAN data, which apparently Chrome is expecting.

    Any help would be greatly appreciated.

    • Edited by fanostro Friday, January 19, 2018 9:59 PM
    • Moved by Bill_Stewart Monday, March 12, 2018 8:35 PM This is not a support forum for gallery scripts
    Friday, January 19, 2018 9:50 PM

All replies