In this post we will discuss how to approve a modified master page using PowerShell in SharePoint 2010.
Also check out:
Sometimes SharePoint gives some error when you try to commit the master page which you have edited using SharePoint designer 2010. In that case you can use the PowerShell to approve the master page.
The following PowerShell Script will help you to approve the masterpage in SharePoint.
Open SharePoint 2010 management PowerShell, Make sure you are running as administrator mode.
$SPWeb = Get-SPWeb "http://SiteURL"
$file = $SPWeb.GetFile("_catalogs/masterpage/MyCustomMaster.master")