Is there a way, within a site collection, to see all the pages that use a particular masterpage?

I have several masterpages and can't remember which ones are used where.


One option would be to use powershell to iterate through the site collection. Something along the lines of this:

$site = Get-SPSite "http://site.domain.com"
$webs = $site.AllWebs

$webs | % { 
    $obj = new-object System.Object
    $obj | Add-Member -type NoteProperty -name WebUrl -value $_.Url
    $obj | Add-Member -type NoteProperty -name Master -value $_.MasterUrl
    $obj | Add-Member -type NoteProperty -name CustomMaster -value $_.CustomMasterUrl
} | Export-CSV -NoTypeInformation -Path "C:\folder\MasterPages.csv"
| improve this answer | |
  • Hmmm... interesting answer. Let me try this out and I'll let you know how it works for me. – bgmCoder Dec 14 '12 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.