SharePoint 2013: How to get the available page layouts of a web

Title

Get the available page layouts of a web in SharePoint 2013 via PowerShell

Business Goal

In my work as a consultant I sometimes need to analyse how a current SharePoint 2013 farm looks like. Of course you have great tools to help you with this like SPDOCKit. But sometimes I need more details of a farm. In this case I needed information on what kind of page layouts where used on a web.

Technical Overview

The solution is a PowerShell script that uses GetAvailablePageLayouts method to get the available page layouts of a web in a SharePoint 2013 farm. It also uses a definition of a parameter to get a value of a web. A nice description of this technique can be found in an article of Don Jones in Technet Magazine – Windows PowerShell: Defining Parameters.

Prerequisites

To complete this how-to, you must have the following prerequisites must be met:
– A domain account that can log on to one of the SharePoint 2013 servers
– A domain account that has privileges to manage SharePoint 2013 via PowerShell (SPShellAdmin role)

Steps

1. Run the Powershell script .\get_pagelayouts.ps1 with your desired weburl, for instance .\get_pagelayouts.ps1 http://weburl

Additional resources

Gallery Technet – Get the available page layouts of a web
SPDOCKit
Technet – PublishingWeb.GetAvailablePageLayouts method
Technet Magazine – Don Jones – Windows PowerShell: Defining Parameters

Applies to

SharePoint 2013, SharePoint 2010

Change History

23-01-2015 – 1.0

You may also like...

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.