SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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 '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


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