This can be done easily using SharePoint Object Model. The below code will list all the sites and the definition used to create these sites:
SPSite site = new SPSite("SiteURL");
SPWebCollection webs = site.AllWebs;
foreach (SPWeb web in webs)
{
try
{
string template = web.WebTemplate;
Console.WriteLine(web.Url.ToString()+ " : " + template.ToString());
}
finally
{
web.Close();
site.Close();
}
}
No comments:
Post a Comment