I can create a self signed certificate with PowerShell:
$cert = New-SelfSignedCertificate –DnsName www.test.com -CertStoreLocation “cert:\LocalMachine\My”
I also can create bindings for my site:
New-WebBinding -Name "Test" -IPAddress "*" -Protocol "https" -Port 443 -HostHeader www.test.com -SslFlags 1
However based on the documentation New-WebBinding has no parameter which accepts a certificate see: New-WebBinding documentation
Question
How can I properly create the https binding which is using the created certificate?