Wednesday, August 8, 2012

Create Sharepoint Site Using Site Template ID's

Whenever we create a site in Sharepoint we chose a site template. If the site is being created from Central Administration, you pick up the desired template.If the site collection creation is done from powershell console/stsadm we would have to specify the site template value for the desired site template.

For stsadm(MOSS 2007)

stsadm -o createsite -url <url> -owneremail <email address> [-ownerlogin <DOMAIN\name>] [-ownername <display name>] [-secondaryemail <email address>] [-secondarylogin <DOMAIN\name>] [-secondaryname <display name>] [-lcid <language>] [-sitetemplate <site template>] [-title <site title>] [-description <site description>] [-hostheaderwebapplicationurl <web application url>] [-quota <quota template>]

-sitetemplate STS#number/MPS#number

STS#0: Team Site

STS#1: Blank Site

STS#2: Document Workspace

MPS#0: Basic Meeting Workspace

MPS#1: Blank Meeting Workspace

MPS#2: Decision Meeting Workspace

MPS#3: Social Meeting Workspace

MPS#4: Multipage Meeting Workspace

For powershell(Sharepoint 2010)

$template = Get-SPWebTemplate "STS#0"
New-SPSite -Url "<URL for the new site collection>" -OwnerAlias "<domain\user>" -Template $template

No comments:

Post a Comment