To create a site collection by using Windows PowerShell
$template = Get-SPWebTemplate "STS#0"
New-SPSite -Url "<URL for the new site collection>" -OwnerAlias "<domain\user>" -Template $template
- Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
- On the Start menu, click All Programs.
- Click Microsoft SharePoint 2010 Products.
- Click SharePoint 2010 Management Shell.
- From the Windows PowerShell command prompt (that is, PS C:\>), type the following command and press ENTER:
$template = Get-SPWebTemplate "STS#0"
New-SPSite -Url "<URL for the new site collection>" -OwnerAlias "<domain\user>" -Template $template
This example retrieves a list of all available site templates and then creates a site collection by using the Team Site template. For more information, see New-SPSite and Get-SPWebTemplate.
No comments:
Post a Comment