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()

Iterate through every library and open pages in SharePoint

SharePoint and PowerShell: Get all Site Collections that are using Nintex