I have the following script that sets up my website...
%AppCmd% ADD SITE /name:%SiteName% /physicalPath:%SitePath% /bindings:http/*:80:%SiteName%
%AppCmd% SET SITE /site.name:%SiteName% /[path='/'].applicationPool:%SiteName%
What I would like to do now is to find out how to add an additional binding for HTTPS. Seen plenty of pages describing now to add a host header to an existing https binding but none that show actually how to add a new binding as you can do in the UI.
Note: I believe I need two bindings, one HTTP (port 80) and one HTTPS (port 443) as at present I need to have port 80 open as I use a redirect rule to swap people that hit the site on port 80 over onto 443. If there is a way I can avoid doing this and simply my bindings I'm all for it.
see below how I used to SSL port 443
appcmd set site /site.name:NAME_SITE_IIS /+bindings. [protocol='https',bindingInformation='
:443:yourdomain.com.br
']
Where it is in bold, change the information