Using PowerShell
From Windows 8.1 and Windows Server 2012 R2 (Windows PowerShell 4.0) and upwards, you can create a self-signed certificate using the new New-SelfSignedCertificate
cmdlet:
Examples:
New-SelfSignedCertificate -DnsName www.mydomain.example -CertStoreLocation cert:\LocalMachine\My
New-SelfSignedCertificate -DnsName subdomain.mydomain.example -CertStoreLocation cert:\LocalMachine\My
New-SelfSignedCertificate -DnsName *.mydomain.example -CertStoreLocation cert:\LocalMachine\My
Using the IIS Manager
Note that IIS certificates use SHA-1 hashing, which isn’t supported by modern browsers. IIS cannot create certificates using SHA-2 hashing options, thus it cannot create SSL certificates accepted by modern browsers.
- Launch the IIS Manager
- At the server level, under IIS, select Server Certificates
- On the right hand side under Actions select Create Self-Signed Certificate
- Where it says “Specify a friendly name for the certificate” type in an appropriate name for reference.
- Examples:
www.domain.example
orsubdomain.domain.example
- Examples:
- Then, select your website from the list on the left hand side
- On the right hand side under Actions select Bindings
- Add a new HTTPS binding and select the certificate you just created (if your certificate is a wildcard certificate you’ll need to specify a hostname)
- Click OK and test it out.