Wednesday, January 13, 2016

Apply page layout for a particular page in SharePoint 2013 using PowerShell

In this article we will see how to apply page layout for a particular page in SharePoint 2013 using PowerShell,

$spWeb = Get-SPWeb("https://server.com/sites/MyWeb")
$spFile = $spWeb.GetFile("https://server.com/sites/Pages/MyPage.aspx")
$spFile.CheckOut("Online",$null)
$spFile.Properties["PublishingPageLayout"] = "/sites/_catalogs/masterpage/PageLayout.aspx"
$spFile.Update()
$spFile.CheckIn("Update page layout via PowerShell",[Microsoft.SharePoint.SPCheckinType]::MajorCheckIn)
$spWeb.Dispose()

Hope this helps!

Select and Delete text vertically in bigger text OR flat file

If you want to Select and Delete text vertically in bigger text OR any flat file use below command to do it. Example below: A BCEDF CDEF...