PowerShell: SharePoint - Determine if a File is Ghosted

Updated on 2/7/2015

The following PowerShell can be used to determine if a file is ghosted when SharePoint developer isn't available. This example checks the seattle.master.

$web = get-spweb http://sharepoint:81
$file = $web.RootFolder.SubFolders["_catalogs"].subfolders["masterpage"].files["seattle.master"]
$file | fl

The CustomizedPageStatus will indicate whether or not the file is ghosted.