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.
Excellent – thanks for this!