Create a New Site Collection

Scenario/Problem: You need to create a new top-level site collection.

Solution: Use the New-SPSite cmdlet from the SharePoint 2013 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>

Listing 3.6 shows a sample command-line entry for creating the root site collection using the Team Site template.

Listing 3.6. Creating the Root Top-Level Site Collection

New-SPSite -url http://sp2013/ -name Home -owneralias SP\SiteAdmin-template STS#0

You can find the site template names using Get-SPWebTemplate. If no template ...

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.