So say you are given the task to edit\support a site or perhaps you wish to create a new site based on an existing site already in production. 9 times out of 10 you need to know what site template it was based off of before you can continue. Unfortunately you can’t just look at the site code or the html\aspx source to determine this. Enter PowerShell. Have I ever mentioned I really love PowerShell (don’t worry, I won’t go into a PowerShell fanboy rant. I’ll save that for another day ;D ).
Anyways, all kidding aside, you can quite easily determine this a very simple PowerShell script.
$spWeb = Get-SPWeb http://<SP site address>
write-host "Web Template:" $spWeb.WebTemplate " | Web Template ID:" $spWeb.WebTemplateId
So of course the first line gets the site based on the address passed in.
The next line will create a heading and output the results within that heading.
For example a return you could get is Web Template: STS | Web Template ID: 1 which indicates the site is a Windows Services SharePoint site – Team Site.
To further assist you when you run this script Code Nice has a list that you can use to cross reference your results. You can find the list here.