Host Headers Option?

May 19, 2011 at 1:13 PM


I don't see an option in the XML to specify the host header for the web applications. Has anyone had any experience with this?


May 20, 2011 at 1:21 AM

 In the CreateWebApp function the host Header defaults to the url without "http://" (or https://). See below for snippet of code

So , if your url is then the host header will be


If ($url -like "https://*") {$UseSSL = $true; $HostHeader = $url -replace "https://",""}       
    Else {$HostHeader = $url -replace "http://",""}


May 20, 2011 at 4:10 AM

Thanks @bes12, that's indeed correct and exactly what I was going to reply.


May 20, 2011 at 8:58 AM

great, thank you both!