Quantcast
Viewing latest article 4
Browse Latest Browse All 5

Get Site Template ID for Custom Site Templates

I have been spending a lot of time in Powershell over the last week and have learnt a lot about how this great tool can customise SharePoint 2010.

As part of the project we have created a set of custom site templates and I had to create a new school with several custom site templates.

In a previous post I have listed the out of the box site templates which you might need to create a site through powershell but now you need to create one with a custom template ID.

To get this ID you need to create a PowerShell file (.ps1) with the below script.

$url = “http://sp2010/”
$site= new-Object Microsoft.SharePoint.SPSite($url )
$loc= [System.Int32]::Parse(1033)
$templates= $site.GetWebTemplates($loc)
foreach ($child in $templates){ write-host $child.Name “  ” $child.Title}

You will then see the a list of all different IDs and names.

Image may be NSFW.
Clik here to view.
image


Viewing latest article 4
Browse Latest Browse All 5

Trending Articles