Search code examples
iisiis-7iis-7.5netsh

netsh hostnameport not valid argument


I am trying to register an SSL cert to a hostnameport on Windows 7 and windows server 2008R2 and it looks like that parameter isn't supported?

My command:

netsh http add sslcert hostnameport=mywebsite.com:443 certhash=de197ad9ec9c4d855b549c74d7033e1e4b31b1af appid={2d967d25-4edf-4962-9b6c-5b3c4d4de48d}

I get the error that says hostnameport is not a valid argument for this command. Is this a limitation of OS? It works fine for Windows 10 and above that i have been able to test so far.


Solution

  • hostnameport was added as part of IIS SNI, and solely available in Windows 8 and above, so the error message is expected,

    https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-server-name-indication-sni-ssl-scalability

    Windows 7 and Windows Server 2008 R2 are both end-of-life, so don't waste your time on them.