Monday 5 January 2015

Script to Find the Master Page Used



$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"

No comments:

Post a Comment