SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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
    $obj
} | Export-CSV -NoTypeInformation -Path "C:\folder\MasterPages.csv"
share|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
    
This works very well! Thank you! – bgmCoder Dec 20 '12 at 23:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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