Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Get All site collections
$SiteCollections = Get-SPWebApplication | Get-SPSite -Limit All
#Loop through all site collections
foreach($Site in $SiteCollections)
{
#Loop throuh all Sub Sites
foreach($Web in $Site.AllWebs)
{
$MasterPage = $Web.GetFile($Web.MasterUrl);
$MasterPage.Name +" : " +$Web.Url
}
}This code describe the Powershell commands to get Master Pages applied to all the sites and sub site in a SharePoint Site Collection 2013.
Below are the Powershell commands to get Master Pages applied to all the sites and sub site in a SharePoint Site Collection 2013.
