Skip to content

Instantly share code, notes, and snippets.

@phillippelevidad
Created October 8, 2018 12:52
Show Gist options
  • Save phillippelevidad/eb8ff979c42fd25a5f9141610dacd5ae to your computer and use it in GitHub Desktop.
Save phillippelevidad/eb8ff979c42fd25a5f9141610dacd5ae to your computer and use it in GitHub Desktop.
Generate a self-signed certificate on Windows
# Generate a self-signed certificate
# Browse to Control Panel > Manage computer certificates > Personal > Certificates and find yours
$dnsName = "www.example.com"
$friendlyName = "Example"
New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -DnsName $dnsName -FriendlyName $friendlyName -NotAfter (Get-Date).AddYears(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment