Quantcast
Channel: and so it begins…..
Viewing all articles
Browse latest Browse all 55

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

$
0
0

 

# 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.


Viewing all articles
Browse latest Browse all 55

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>