Create a self-signed certificate

New-SelfSignedCertificate -DnsName myDns.com -Subject "CN=MyNewCert" -certstorelocation cert:\localmachine\my

$pwd = ConvertTo-SecureString -String "Some-Strong-Password" -Force -AsPlainText

Export-PfxCertificate -cert cert:\localMachine\my\<thumbprint>  -FilePath root-authority.pfx -Password $pwd

Export-Certificate -Cert cert:\localMachine\my\<thumbprint> -FilePath root-authority.crt

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *