i want to create a PowerShell-script that can list the actual size of a SharePoint site-collection (among other infos) and export that to CSV.
Writing that script i discovered that there's more than one way to get the "size" of a site-collection:

  1. SPSite.UsageInfo.Storage
    "Contains the total amount of storage in bytes that is consumed by the site collection" http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.usageinfo.storage.aspx
  2. SPSiteAdministration.DiskUsed
    "Gets a value indicating the amount of disk space used by the site collection"

In my experience the SPSiteAdministration.DiskUsed is larger than the SPSite.UsageInfo.Storage in most cases, while sometimes they both return the same value.

So, can somebody explain what exactly the difference is ?

2 Answers 2


I +1'd Anders answer because it's the right way to approach what you want to do, but to your point it doesn't address your question of what's the different between "amount of storage in bytes" and "amount of disk space used".

There's two possible reasons for this as I see it:

1) UsageInfo is calculated real-time, as data is added or removed from a site collection. Whereas I believe DiskUsed is calculated at a set interval as part of a maintenance job.

2) UsageInfo may not count items in the stage 2 recycle bin, as they are not counted towards quotas. Only items in the stage 1 recycle bin are counted towards quotas.


Take a look at the SPSite.Usage property

Todd Klindt have an example of a script that does close to what you want here.

  • that post is close to how i started, and i have finished the script in the meantime - but it does not answer my question! Why is the 'amount of storage in bytes' in most cases lower than the 'amount of disk space used'?
    – user1730
    Commented Aug 12, 2011 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.