locked
How to find which site template is used for a an existing site RRS feed

  • Question

  • Hello

    I am running following sql query to know about site teplate is used for an existing site

    SELECT

     

    Title, WebTemplate FROM dbo.Webs where Title ="Intranet Site"

    It is returning '20' in web template column, Now I am confused here I am assuming it should be team site, but it seems it is "Publishing Portal".

    Please correct me If I am wrong?

    Monday, November 8, 2010 4:30 PM

Answers

All replies

  • I am using Power Shell script for that. I think reading SharePoint database is not good idea.

    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    $site = new-Object Microsoft.SharePoint.SPSite('http://mysite/')
    $web = $site.OpenWeb()
    Write-Output $web.WebTemplate;
    Write-Output $web.WebTemplateId;
    $web.Dispose();
    $site.Dispose();

     


    Oleg
    Monday, November 8, 2010 4:55 PM
  • you can also run the stsadm command enum allwebs: stsadm.exe -o enumallwebs -database [content database name]

    For more details about the available the options check this one: http://praveenbattula.blogspot.com/2010/08/know-site-template-used-for-sharepoint.html

     

    hope this help

    thanks

    -ws

     


    SharePoint administrator, MCTS,MCITP
    • Marked as answer by Avian123 Tuesday, November 16, 2010 3:29 AM
    Monday, November 8, 2010 5:05 PM