SiteHealthCheck and Deleted Sites

By | 2017-03-27

When performing an upgrade or migration of an on premise SharePoint environment, it is important so check everything in the Farm. This particularly includes contentdatabases and sites. I ran into this when debugging a site that was partly deleted. I couldn’t get it removed and then tried to determine what the problem was, the SPSiteHealth check didn’t help me in this case. Eventually I force removed the site and after some timerjob had ran the site was gone.


Some examples to check sites for issues related to upgrades and migrations:


You can also have SharePoint repair the specific site for you:




The Repair-SPSite cmdlet runs one or all site collection health checks on the site collection and its contents. This cmdlet automatically repairs issues that it finds.

Run the Test-SPSite cmdlet for reports of rules which were run and a summary of the results.


Note: the only repairable SiteHealthRule is the “Missing Galleries” rule.

More info:
You run the health checks manually to prepare for an upgrade. In addition, the health checks are run automatically in repair mode when you start to upgrade a site collection. You can also run the health checks at any time to verify that a site is working as expected. The site collection pre-upgrade health checks examine a site collection and list potential upgrade issues, such as missing or unsupported elements. For example, the results itemize customized files so that you can identify the custom file and reset it to the default template in the site definition, if you want. After you run the checks, a report lists potential issues. The report also has information about how to address the issues.

MSDN Article



About the site delete action, read this article from Bill Baer, it explains the internals concerning the site deletion in SharePoint 2010 and up worth. Next up, read this article which provides some Powershell commands to really delete your site. (Or just use it: Get-SPWebApplication | Get-SPDeletedSite | Remove-SPDeletedSite .)

It involves an SPTimerJob “Gradual Site Delete” (Microsoft.SharePoint.Administration.SPSiteDeletionJobDefinition) which is scheduled daily at night.


Leave a Reply

Your email address will not be published. Required fields are marked *