8
1
I'm trying to make simple script so my site can be reached both as www.example.com
and simply example.com
. How do I pass it as a binding argument?
Here's what I try:
$iisApp = New-Item $iisAppName -bindings @{protocol="http";bindingInformation="*:80:"+ $url + ",*:80:www." + $url} -physicalPath $directoryPath
$iisApp | Set-ItemProperty -Name "applicationPool" -Value $iisAppPoolName