Binding not Created for Host Header Site Collections
By Brian
I noticed what I think is a bug (or maybe a limitation) in SharePoint 2010. When I use PowerShell to create a Host Header Site Collection, SharePoint does not create a binding in IIS. If I add the binding manually, everything works great, but I would expect SharePoint to do this for. Am I missing something?
The following PowerShell script will create a new web application. Note that I have the option to add a host header.
When I run it, a new site is created in IIS and the appropriate binding is created with the host header I supplied.
This next script will add a host header site collection to the web application. According to the documentation for New-SPSite, there is no way to pass the host header.
When I run this script, the site collection is created, but the binding is not created in IIS.
If I create the binding manually everything works great.
NOTE: I was able to script the creation of the binding.
Am I missing something? Is there another parameter I need to pass?
The following PowerShell script will create a new web application. Note that I have the option to add a host header.
|
|
This next script will add a host header site collection to the web application. According to the documentation for New-SPSite, there is no way to pass the host header.
|
|
If I create the binding manually everything works great.
NOTE: I was able to script the creation of the binding.
|
|