I have a site collection http:/SC/ under which I have a site http:/SC/site. Can you provide powershell to check which template http:/SC/site is using?


You mean like this?

$web = Get-SPWeb http:/SC/site
$web.WebTemplate + " " + $web.WebTemplateId
  • I got the result "SAHREDSERVICEPROJECT" and template ID can I get my template display name also? or any way to check which template display name has this ID – Brishal Apr 15 '14 at 7:15
  • You can use Get-SPWebTeamplate, e.g., Get-SPWebTemplate | ? { $_.Name -like "*SAHREDSERVICEPROJECT*" } – eirikb Apr 15 '14 at 7:20
  • 3
    Alternatively, on one line: Get-SPWeb -Site "http://sc" | select Title, URL, WebTemplate, WebTemplateId or, get all webs in a site: Get-SPSite | Get-SPWeb | select Title, URL, WebTemplate, WebTemplateId – Underverse Jun 29 '15 at 0:56

PowerShell code to find the site template id and name

$web = Get-SPWeb http://dmsApp/dept/ceo/
write-host "Web Template:" $web.WebTemplate " | Web Template ID:" $web.WebTemplateId

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.