In this post, we will discuss how we can get a list of pages that are using a particular page layout in SharePoint 2013 using PowerShell. Recently while working on a moss 2007 to SharePoint 2013 migration project we got a scenario where we need to find out the page names from a document library which is using a particular page layout.
Below is the PowerShell script.
$site = get-SPSite http://win-pfcp2dgt8di/sites/EnjoySharePoint/
$web = $site.RootWeb
$pweb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
$pPages = $pWeb.GetPublishingPages();
$pLayouts =”ErrorLayout.aspx” #$pweb.GetAvailablePageLayouts()
foreach ($pPage in $pPages)
if ($pPage.Layout.Name -eq $pLayouts)
Hope this will be helpful.
-: FREE PDF e-Book Download :-
51 JSOM Examples in SharePoint Online
You May Also like the Following SharePoint Online Tutorials: