I want to add a binding to a site using appcmd. But when I try the following command I get an error:
appcmd set site /site.name:"My site name" /+bindings.[protocol='https',bindingInformation='*:443:sub.mydomain.com']
The error:
ERROR ( message:Cannot find SITE object with identifier "bindingInformation='*:443:sub.mydomain.com']". )
I checked if the site exists and it does. What am I doing wrong?
If you're using PowerShell, you have to surround the bindings parameter with double quotes so that PowerShell doesn't interpret the single quotes before the command is sent to appcmd.
./appcmd set site /site.name: contoso /+"bindings.[protocol='https',bindingInformation='*:443:']"
source: http://technet.microsoft.com/en-us/library/cc731692(v=ws.10).aspx
Try this:
appcmd set site "My site name" /bindings:"https://sub.mydomain.com:443"
But your command is correct as well. List all websites and make sure you are using one of them:
appcmd list site
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With