PowerShell Get a List of Site Templates

If you need to script out a list of available site templates, here is the answer.


Add-PSSnapin Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue
$site = Get-SPSite "http://www.sharepointed.com/tacoSiteCollection"
$web = $site.RootWeb
$listTemplates = $site.GetCustomListTemplates($web)

foreach($xx in $listTemplates)
 {
 Write-Host $xx.FeatureId
 }

$site.Dispose()

Leave a Reply

Your email address will not be published. Required fields are marked *