Microsoft Security Tech Accelerator
Dec 06 2023, 07:00 AM - 12:00 PM (PST)
Microsoft Tech Community
Look at all of the pretty sites....
Published Feb 08 2019 12:46 PM 282 Views

First published on MSDN on Sep 22, 2011

I’m sure any SharePoint administrator who supports a reasonably sized farm struggles with the idea of how to contain the massive amount of site collections in their farm. As adoption grows, the number of site collections and the amount of data keeps growing and growing. Managing all of this data turns into a real challenge.  We all know we can’t count of users to actually delete anything when they’re done with it, so we need to come up with a strategy.

SharePoint has had a feature called the “Site usage confirmation” feature since SharePoint 2003. Unfortunately this “feature” has no actual intelligence. It sends an email to the primary and secondary site collection owners on a specified interval. If no one clicks the “we’re still using this site” link, the site gets deleted after the specified interval. That’s not real helpful. To read more about the feature, go here.

Now, some of you might have thought about this a little harder. You did some digging and see some fields in the content databases, named things like LastAccessedDate and LastModifiedDate. Unfortunately there’s no guarantee that these values are reliable, so don’t even try to use them. Things like patches touch these values, so they’re wildly inaccurate for what you’d expect them to do.

So now what you ask. Well, we can use a combination of things to solve this problem. Although they’re not perfect, they’re still our best option. We’re going to leverage the Site Usage Confirmation feature, along with a custom SharePoint Site Collection Recycle Bin . What will happen is, when a site collection is deleted, this feature, or a custom one you build, captures the delete event, and then backs up a copy of the site collection. Now we have a way to quickly restore sites back to this last state, if the site was still in use. If you’re using SharePoint 2010 with SP1, you no longer need the custom feature, because there’s a site collection recycle bin built in.

If you want to get fancy with this, you can build a custom tool to do this type of work as well. I’d suggest maybe locking the site collection first, before you delete it. You could also use some sort of page header to display a warning message about upcoming deletes. The possibilities are endless.

Hopefully I’ve provided you with all technical details as to how to do this. Good luck convincing the SharePoint stakeholders to let you do this.

NOTES: This article applies to both SharePoint 2007 and SharePoint 2010. The SharePoint Site collection recycle bin may have formerly been known as the MSIT Site Delete capture tool.

PS: I’m hoping the SharePoint product group does something to change this in Wave 15. If you want to see a better feature, comment on my blog. If we get enough comments, I’ll do my best to pass them along.

Version history
Last update:
‎Apr 28 2020 12:05 PM
Updated by: