So the Microsoft.Web.Administration API is very easy to use to create HTTP and HTTPS bindings for sites:
using (ServerManager manager = new
I feel like it's important to highlight Devator's comment in this answer. There appears to be a bug that prevents the certificate changes from taking place and I would never have solved it without seeing this comment.
If you set the binding information to itself, this causes IIS to bind the certificate. A quick example is shown below:
binding.BindingInformation = binding.BindingInformation;