This chapter is from the book
Create a New Site Collection
Solution: Use the New-SPSite cmdlet from the SharePoint 2010 Management Shell.
To add a new site collection, use the New-SPSite cmdlet, as follows:
New-SPSite –url <full url of new site collection> -name <name of new site collection> -owneralias <site collection administrator> -template <site collection template to use>
A sample command-line entry for creating the root site collection using the Team Site template is shown in Listing 3.6.
Listing 3.6. Creating the Root Top-level Site Collection
New-SPSite –url http://sp2010/ -name Home -owneralias SP\SiteAdmin -template STS#0
The site template names can be found using Get-SPWebTemplates. If no template is provided, the site collection will still be created. In this case, once the site is accessed via the browser, SharePoint will prompt for a site collection template to be selected.