Last active
June 8, 2017 03:02
-
-
Save litodam/696921a9eb34cabd15099228243901f2 to your computer and use it in GitHub Desktop.
Create Self-signed certificate for IIS (with Subject Alternative Name)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires PowerShell to be run as Admin. | |
New-SelfSignedCertificate -CertStoreLocation cert:\localmachine\my -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -Subject "cn=lito.com" -DnsName "lito.com" -KeyDescription "lito.com" -NotBefore (Get-Date).AddDays(-1) -NotAfter (Get-Date).AddYears(2) -FriendlyName "Self Signed Cert for lito.com" | |
# After creating it open the Certificate Store and copy the cert under Trusted Root Certificate Authorities |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment