Add existing certificate to existing IIS 7.5 site on Windows Server 2008


This may not directly be related to Octopus, but here’s my scenario:

  • I have a certificate installed on my server (Windows Server 2008 R2, with IIS 7.5)
  • I create a new HTTPS binding via PowerShell command (New-WebBinding), but I have no way here to associate this to the certificate I have (for which I do have the Thumbprint)

Any ideas on how I can go about making this association. In the attached screenshot, this can be done in the GUI simply by editing the HTTPS binding and selecting it from the drop-down, though haven’t seen a good example to do this via PowerShell or Command Line.

Also, in general, a lot of things that work via PowerShell v5 in Windows Server 2012 don’t work using the same PowerShell version on Windows Server 2008. I’m wondering if these are common issues others have faced, and ideas on how to get past them.