How to create an IIS Self-Signed SSL certification for 10 years or longer
The solution is quite easy with PowerShell
New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -DnsName “stargate.domainname.com” -FriendlyName “Stargate” -NotAfter (Get-Date).AddYears(20)
Using certmgr, make sure copy it from Personal Certificates to the Trusted Root Certification Authorities, or it won’t appear in IIS Server Certification.