If you mean just programming the NUMBER port, 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 (for example, ": 443:"). (If several sites are installed on the server, you will need to replace w3svc / x / securebindings, where x is the identifier of the website.)
CERTIFICATE , , , script IIS 6.0 Resource Kit, (IISCertDeploy.vbs), .