PowerShell Get SharePoint Page Layouts

I was having an issue with a script and needed to find my available page layouts. Below is the script you will need to run to find the available page layouts for a given site.

$web = Get-SPweb "http://sharepointed.com/sites/taco"

		$pubWeb =[Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
		$pl = $pubWeb.GetAvailablePageLayouts()
		foreach($p in $pl)
		{
			Write-Host $p.Name
		}
$site.Dispose()

Leave a Reply

Your email address will not be published. Required fields are marked *