Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ignas-sakalauskas/2006ab95a649507510ce73b8a654234c to your computer and use it in GitHub Desktop.
Save ignas-sakalauskas/2006ab95a649507510ce73b8a654234c to your computer and use it in GitHub Desktop.
Self-signed multi-domain SSL certificate generator
# new-selfsignedcertificateex.ps1 Downloaded from
# https://gallery.technet.microsoft.com/scriptcenter/Self-signed-certificate-5920a7c6
. ".\new-selfsignedcertificateex.ps1"
New-SelfsignedCertificateEx `
-Subject "CN=mytestdomain" `
-EKU 'Server Authentication', 'Client Authentication' `
-SAN "mytestdomain", "localhost" `
-FriendlyName 'Local Dev Self Signed Cert' `
-Exportable `
-StoreLocation 'LocalMachine' `
-KeyLength 2048 `
-ProviderName 'Microsoft Enhanced Cryptographic Provider v1.0' `
-AlgorithmName 'RSA' `
-SignatureAlgorithm 'SHA256'
# https://ignas.me/tech/self-signed-multi-domain-ssl-certificate/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment