For later use

UnGhosting Customized Page Layouts with PowerShell

posted Aug 31, 2015, 3:10 AM by Benny Skogberg

Sometimes you end up in a solution where someone have been kind enough to use SharePoint Designer to edit a Page Layout. This means that you are not able to change the Page Layout through your deployed code, in a package. Changes made in the development environment doesn’t show up in production. Your Page Layout is in a Ghosted mode of its origin, and we need to Un-Ghost the Page Layout to be able to change it from a package created in our development environment.

Thus you use this script to first find out which Page Layouts have been changed, and uncomment the Revert Content Stream to actually change the Page Layout back to an UnGhosted mode.