I want to modify the layout of my page Index.aspx.
I adapt the html code with my change and i deploy the change on my sharepoint server. The problem was, i cannot the change. There was only the old page layout.
On a forum i found a code that can "apply" the change but the code crashed my application.
$spWeb = Get-SPWeb("mywebsite") $spFile = $spWeb.GetFile("mywebsite/Pages/Index.aspx") $spFile.CheckOut("Online",$null) $spFile.Properties["PublishingPageLayout"] = "/_catalogs/masterpage/Pages/Index.aspx, Index" $spFile.Update() $spFile.CheckIn("Update page layout via PowerShell",[Microsoft.SharePoint.SPCheckinType]::MajorCheckIn) $spWeb.Dispose()
How can i rollback the change ?