Skip to content

Instantly share code, notes, and snippets.

@expiscornovus
Created March 29, 2021 21:09
Show Gist options
  • Save expiscornovus/6807d20867a424c98d21facf0a6b218a to your computer and use it in GitHub Desktop.
Save expiscornovus/6807d20867a424c98d21facf0a6b218a to your computer and use it in GitHub Desktop.
Get the available page layouts of a web in SharePoint 2013 via PowerShell
Param(
[string]$weburl
)
$spweb = Get-SPWeb -Identity $weburl
$pubweb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($spweb)
$pagelayouts = $pubweb.GetAvailablePageLayouts() | Select Title,Name
$pagelayouts
$spweb.Dispose()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment