Skip to content

Instantly share code, notes, and snippets.

@gregorypilar
Created January 20, 2022 13:13
Show Gist options
  • Save gregorypilar/3394a3e5eced80a021e32b9724262282 to your computer and use it in GitHub Desktop.
Save gregorypilar/3394a3e5eced80a021e32b9724262282 to your computer and use it in GitHub Desktop.
$cert = New-SelfSignedCertificate -DnsName mydemowebapp.net -CertStoreLocation cert:\LocalMachine\My
$pwd = ConvertTo-SecureString -String "MyPassword" -Force -AsPlainText
Export-PfxCertificate -Cert $cert -FilePath C:\temp\cert.pfx -Password $pwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment