Sharepoint 2010 Subsite/Document Library/Lists Storage Data

Answered Sharepoint 2010 Subsite/Document Library/Lists Storage Data

  • 2012년 4월 26일 목요일 오전 1:53
     
     

    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 when using a .NET Reflector for the assembly) and pulling data from sharepoint's database isnt recommended either :/

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

모든 응답

  • 2012년 5월 2일 수요일 오전 1:54
     
     답변됨

    Hi AugustusWee,

    Thanks for your post!

    After some research, I don't find other way to get the storage data, and I still suggest you use  site.StorageManagementInformation to get the data, this object is currently obsolete but still works for SharePoint 2010 SP1.

    For more information, please refer to:
    http://www.jonthenerd.com/2011/08/16/sharepoint-2010-findinglargestdoclibrary/

    Thanks,
    Simon


    Simon Huang

    TechNet Community Support

    • 답변으로 표시됨 Shimin Huang 2012년 5월 4일 금요일 오전 6:13
    •