Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure IIS 6 website SSL port programmatically?

Tags:

iis-6

I am trying to configure the website SSL port with the certificate for a website within IIS 6.0 programmatically.

IIS 7.0 provides the API, ServerManager, to do so, but I am not sure if there is something similar for IIS 6.0 or command line utilities.

Thanks in advance!

like image 393
Ray Lu Avatar asked Jan 08 '09 00:01

Ray Lu


People also ask

How do I enable SSL in IIS 6?

Open Internet Information Services (IIS) Manager. On the Start menu, click Administrative Tools > Internet Information Services (IIS) Manager. Right-click on the website that you want to use your SSL certificate to secure and then, click Properties.

How do I enable SSL on IIS 8?

In Internet Information Services (IIS) Manager, under Connections, expand your server's name, expand Sites, and then select the website on which you want to install the SSL Certificate. In the Actions menu, under Edit Site, click Bindings. In the Site Bindings window, select binding for https and then, click Edit.


1 Answers

If you mean just setting the port NUMBER programmatically, you can use the metabase command line tool (by default in C:\Inetpub\AdminScripts):

cscript adsutil.vbs set w3svc/1/securebindings ":nnn:"

where nnn is the port number (e.g., ":443:"). (If you have more than one site on the server, you will need to substitute w3svc/x/securebindings, where x is the web site ID.)

If you actually need to install the CERTIFICATE programmatically, from what I gather there's a script in the IIS 6.0 Resource Kit to do it (IISCertDeploy.vbs) but I've not tried it.

like image 57
Eric Rosenberger Avatar answered Oct 03 '22 06:10

Eric Rosenberger