There was a custom web part deployed in our environment. For some reasons, web part encountered some issue and made the pages crashed!. Ideally, The developer should have handled the error in web part to avoid page crash! but it didn’t happen! how to remove faulty web part in SharePoint 2007 or in SharePoint 2010?
Alright, to fix the issue, I get into Maintenance mode (by just appending “?contents=1” to the end of URL) E.g.https://sharepoint.company.com/sites/sales/reports.aspx?contents=1
Deleted the particular faulty web part, and we are back to business!
In another case, When we migrated from MOSS 2007 to SharePoint 2010 with 1000+ sites.
After the upgrade for some reason, we wanted to delete a particular web part (Tip of the day web part) from the home page of All migrated sites’ default.aspx page of the many sites. So I wrote the PowerShell code to delete error Web parts programmatically.