Cannot Delete SharePoint Web App (Orphaned DB)
I recently encountered a frustrating SharePoint issue that I hadn't seen in many years and had almost forgotten about. It's a rare problem, but it resurfaced while I was configuring a new SharePoint Subscription Edition farm. I was unable to delete a web application, neither through Central Administration nor with PowerShell using Remove-SPWebApplication due to this error : An object in the SharePoint administrative framework, SPWebApplication Name=webAppName, could not be deleted because other objects depend on it. Update all of these dependants to point to null or different objects and retry this operation. The dependant objects are as follows: Screenshot: Diagnosis There could be multiple possible causes for this symptom, but one way to reproduce the error is attempting to delete the web application and its content database without the sufficient permission on the SharePoint configuration database. In that scenario, the physical content database is dropped in SQL S...