How Create multiple site collections at root on single web application in SharePoint Server 2010(MOSS)

StackOverflow https://stackoverflow.com/questions/18763205

  •  28-06-2022
  •  | 
  •  

Question

I would like to create multiple site collections like http://site1.contoso.com , http://site2.contoso.com in a SharePoint 2010 web application http://portal.contoso.com. So i have followed the host named site collection approach suggested on http://technet.microsoft.com/en-us/library/cc424952(v=office.14).aspx

i tried running the following command on powershell

New-SPWebApplication -Name "HNSC01" -Port 80 -HostHeader http://HNSC01.contoso.com -URL -ApplicationPool ContosoAppPool -ApplicationPoolAccount (Get-SPManagedAccount <server>\<user>) 

Here URL seems to be out of place and since it is parameter i tried running the command with out URL and this is not getting executed at all.

Here are my questions.

  1. I would like to know if i am in the right direction or not?
  2. Is there better way of achieving the same result?
Was it helpful?

Solution

I am able to create Host Named Site Collection(HNSC) using powershell script as per the information provided in the blog but i am open to any other suggestions of achieving the same goal by some other means if there are any better solutions.

http://blogs.msdn.com/b/markarend/archive/2012/05/30/host-named-site-collections-hnsc-for-sharepoint-2010-architects.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top