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.
- I would like to know if i am in the right direction or not?
- Is there better way of achieving the same result?