Get a list of web templates and IDs in a SharePoint site

Get a list of web templates and IDs in a SharePoint site

  • Comments 8
  • Likes

 

# Find the template name of SharePoint site using PowerShell
$web = Get-SPweb http://SiteUrl
Write-host
Web Template:” $web.WebTemplate ” | Web Template ID:” $web.WebTemplateId
$web.Dispose()

# To get a list of all web templates, use the following PowerShell code

function Get-SPWebTemplateWithId
{
     $templates = Get-SPWebTemplate | Sort-Object "Name"
     $templates | ForEach-Object {
    $templateValues = @{
     "Title" = $_.Title
     "Name" = $_.Name
     "ID" = $_.ID
     "Custom" = $_.Custom
     "LocaleId" = $_.LocaleId
      }

New-Object PSObject -Property $templateValues | Select @("Name","Title","LocaleId","Custom","ID")
      }
}

Get-SPWebTemplateWithId | Format-Table

Below is a list of the web templates and their IDs

sdx5qz5d

Hope this helps.

Comments
  • thanks for this usefull info. please allow me to share it on my blog (controlzet.wordpress.com)

  • Very handy.  Thanks for publishing.

  • All about List/Site template (STP/WSP)

    sharepoint.asia/list-and-site-templates-in-sharepoint

  • Thanks Praveeen - very useful!

  • Hi, Thanks for share.
    You can use also this: Get-SPWebTemplate | Select Name, Title, ID | Sort ID

  • Hi,
    This script is useful to obtain all Site Definitions in SharePoint. Do you know the code to obtain also Web Templates (these that use WebTemplate xml)?

    Thanks!

  • Thanks for sharing!

  • http://twittely.com free bootstrap theme and twitter api.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment