Thursday, April 27, 2017

SharePoint and PowerShell: Get all Site Collections by Template

With this script you can check your farm for all site collections using a defined template, in my example it is the community site.
TemplateID:
Community Site(COMMUNITY#0, 62)
Community Portal(COMMUNITYPORTAL#0, 63)
Community Area Template (SPSCOMMU#0, 36)


How did I get the web template id?
$web = Get-SPWeb http://domain/site/yourcommunitysite
Write-Host "Template:" $web.WebTemplate " |ID:" $web.WebTemplateId
$web.Dispose()

No comments:

Post a Comment