2

Basically all I want to do is to get the total storage space of subsites, document libraries and lists within a site collection. There does not seem to be a possible way to do it besides:

  1. using site.StorageManagementInformation which is currently Obsolete
  2. SPSite.UsageInfo this can only work for site collection:

    SPSite.UsageInfo usageInfo = spSite.Usage;
    long storageUsed = usageInfo.Storage;
    
  3. SPWeb.GetUsageData which only gets the current day(and up to the last 31 days) usage data.

  4. finding the database table where Site Collection Administration > Storage Metrics is querying from (which I could not find even with using a .NET Reflector for the assembly)

If anyone has any other way or idea on how to achieve this it would be very much appreciated!

Stefan
  • 14,530
  • 4
  • 55
  • 62
AugustusWee
  • 67
  • 2
  • 9

1 Answers1

0

my suggestion is to try opening the site you are accessing via SharePoint Designer and right click any those collections then click properties. The size of the objects should be shown there as well. :)

lem.mallari
  • 1,274
  • 12
  • 25