08 Agustus 2012 20:42
Anybody know how to get a list of unused Site Collections in SharePoint 2010?
I went through the 'Manage Unused Sites' article (http://technet.microsoft.com/en-us/library/cc262420.aspx).. However, I don't want to enable 'Automatic notifications' or 'automatic deletion'... So, if SharePoint 2010 is already collecting this data somewhere then how & where can I see it?
Any help is much appreciated..
08 Agustus 2012 20:54
I do not know for sure, but I believe that the "unused" data is collected only when automatic deletion is turned on.
In this other thread we discussed the SPSite.DeadWebNotificationCount property to determine how many notifications have been sent for an unused site collection. You could write a PowerShell script that iterates through the site collections in the farm and reports on the DeadWebNotificationCount property to gauge how long a site has been unused for.
Unfortunately if you do not want sites to be automatically deleted, turning automatic deletion on may not be ideal unless you prevent sites from being deleted. Also, it's worth noting that sites that are automatically deleted are placed in the recycle bin so you can restore them.
08 Agustus 2012 21:02
Interesting... so, SPSite.DeadWebNotificationCount won't have any data in it if we have not turnedON automatic deletion? Any idea how would sharepoint determine a site is not being accessed/used for so many days?
08 Agustus 2012 21:15
I don't know if it will have data, my assumption is it does not. It's simply a count of the number of notification messages sent. If automatic deletion isn't turned on, SharePoint doesn't send the notification (and thus there's no reason to change the number of notifications sent). The property doesn't keep track of how long the site has been unused for.
That said, the information may be stored somewhere else. SharePoint has to figure out if the site isn't used in order to send out the notification...
08 Agustus 2012 21:28
Another option is to use: SPWeb.LastItemModifiedDate to know the last update and a dump of web analytics reports to know the number of page views and determine content usage.