SharePoint 2013: Creating a Publishing Page and assigning a page layout using PowerShell

The following PowerShell can be used to create a publishing page and assign a page layout. #Get SPWeb $spWeb = Get-SPWeb("Site URL"); #Get Publishing Web $pubWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($spWeb) #Finds the appropriate page layout $pl = $pubWeb.GetAvailablePageLayouts() | Where { $_.Name -eq "Page Layout Name"} $pages = $pubWeb.GetPublishingPages(); #Create the page; $page = $pages.Add("Page Name", $pl)... Continue Reading →

Website Built with WordPress.com.

Up ↑