[Powershell] Export Self-Signed Certificate

 

$cert = New-SelfSignedCertificate -DnsName yourdomain.cloudapp.net -CertStoreLocation “cert:\LocalMachine\My

$password = ConvertTo-SecureString -String “Password@1234” -Force -AsPlainText

#GenerateĀ .pfx
Export-PfxCertificate -Cert $cert -FilePath “.\my-cert-file.pfx” -Password $password

#Export to .cer format
Export-Certificate -Type CERT -Cert $cert -FilePath .\my-cert-file.cer

(3)

Leave a Reply

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