To get a list of all web templates using PowerShell

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 | Ft -autosize |Out-string -width 4096 >>C:\template.txt

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s