Find All Sites Created with a Specific Site Template

Requirement is to find all blogs created in a SharePoint environment, to apply a fix. Sure, PowerShell can help to find all sites created with a specific site template:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Get All Blog sites
Get-SPWebApplication "https://SharePoint.crescent.com" | Get-SPSite -Limit All | Get-SPWeb -Limit ALL | Where-Object {$_.WebTemplate -eq "BLOG"} | ForEach-Object {
  Write-Host "Site: $($_.Title) at $($_.URL)"
}

To find the site template used in a SharePoint site, use: How to find the site template used in SharePoint?

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

Leave a Reply

Your email address will not be published. Required fields are marked *