There are a lot of different answers to this question, most which work for older versions of Windows but perhaps not Windows 10.
Once you’ve got the method down, though, it really is straightforward:
- Open an admin Powershell window
- Create a self-signed cert for your domain. Here, I’m making a wildcard cert for *.test.com:
New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname *.test.com
- Create a password using ConvertTo-SecureString and export the cert. Replace the thumbprint and path with values for your environment:
$CertPwd = ConvertTo-SecureString -String "foobarpassword" -Force –AsPlainText Export-PfxCertificate -cert cert:\localMachine\my\<thumbprint from new cert command above> -FilePath c:\dev\cert.pfx -Password $CertPwd
- Open Certificate Manager and import the certificate under Trusted Root Certification Authorities.
- Open IIS manager and create an HTTPS binding for the site using your new cert.
- Reboot (to clear Chrome cache etc.)