Steps:
Open your Powershell window in your system.
Paste the below code in your powershell window.
  1. # Find the template name of SharePoint site using PowerShell
  2. $web = Get-SPweb http://gauti.sharepoint.com
  3. Write-host “Web Template:” $web.WebTemplate ” | Web Template ID:” $web.WebTemplateId
  4. $web.Dispose()
  5. # To get a list of all web templates, use the following PowerShell code
  6. function Get-SPWebTemplateWithId
  7. {
  8. $templates = Get-SPWebTemplate | Sort-Object "Name"
  9. $templates | ForEach-Object {
  10. $templateValues = @{
  11. "Title" = $_.Title
  12. "Name" = $_.Name
  13. "ID" = $_.ID
  14. "Custom" = $_.Custom
  15. "LocaleId" = $_.LocaleId
  16. }
  17. New-Object PSObject -Property $templateValues | Select @("Name","Title","LocaleId","Custom","ID")
  18. }
  19. }
  20. Get-SPWebTemplateWithId | Format-Table
Run the application and see the output .
Hope you have enjoyed this.