PowerShell script to list all Webs and Site Templates in use within a Site Collection
March 30, 2011 2 Comments
And one more quick post today, this PowerShell script will iterate through all Webs within a Site Collection, print out their Title, URL, and WebTemplate (Site Template) name.
1: $site = Get-SPSite "http://yoursite"
2: foreach ($web in $site.AllWebs) {
3: $web | Select-Object -Property Title,Url,WebTemplate
4: }
5: $site.Dispose()
And again, before you use this – please read this: https://gvaro.wordpress.com/2011/03/26/test-out-your-powershell-scripts-first-in-a-non-production-environment-first/ (and also read the comment by Anders Rask)
Pingback: Blog del CIIN
Pingback: PowerShell To Update All Sub-Site's Master Page To Parent Master Page in SharePoint 2010 | SharePoint Brian