Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have inherited SharePoint 2010 farm that was previously upgraded from MOSS2007. I am wanting to document the setup and would like to document which site templates were used to create the various site collections and sub-sites in the farm.

How can I determine which site template was used to create a particular site?

share|improve this question

3 Answers 3

By using Powershell:

add-pssnapin "Microsoft.SharePoint.PowerShell"

$s = get-spsite "http://localhost"

#this will resolve the name
$name = $s.RootWeb.WebTemplate

#this will resolve the id
$id = $s.RootWeb.Configuration

#this will give you the template for the specified language
$template = $s.RootWeb.GetAvailableWebTemplates(1033)[$name + "#" + $id]
share|improve this answer
    
This works in 2013 too –  Tom Resing Dec 30 '12 at 21:04
    
+1 $s.RootWeb.WebTemplate is good enough for some lazy people :) It returns a code-like description of the template name. For example "SRCHCENTERLITE" as string instead of template object with Title "Basic Search Center" –  Mzn May 14 at 8:51

The SharePoint 2007 Pre-Upgrade checker should have informed you which templates were in use in the environment, you could refer back to the report generated by that tool to see which where used.

share|improve this answer

Determine site type

$web = Get-SPWeb "http://server/sites/legal/sitename" $templateID = $web.WebTemplateId.ToString() Write-Host $templateID

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.