79668155

Date: 2025-06-16 19:51:50
Score: 3
Natty:
Report link

I know this might be an old post, but I am running into a different issue.

If I have wo websites: Default Web Site and TestSite1. Default Web Site has a good SSL Certificate bound to the site. Now, when I execute the following PowerShell script for TestSite1:

New-WebBinding -Name $SiteName -Protocol $Protocol -IPAddress $IPAddress -Port $Port -HostHeader $Hostname -SslFlags $SslFlags

I see the bindings in IIS for TestSite1, with *|443|Site1, but I also see the certificate that is bound to Default Web Site.

Default Web Site Bindings: *|443|Default.com
TestSite1 Bindings: *|443|Site1

The script continues to bind the cert:

$binding = Get-WebBinding -Name $SiteName -Protocol $Protocol
$null = $binding.AddSslCertificate($Thumbprint, $StoreName)

Now both the Default Web Site and TestSite1 have been updated with the thumbprint for the new cert.

Any ideas how to bind the cert to the new bindings? Or better yet, why is the new binding already set to a cert?

Reasons:
  • Blacklisted phrase (1): Any ideas
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Bob P