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:
- 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 - SPSiteAdministration.DiskUsed
"Gets a value indicating the amount of disk space used by the site collection"
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsiteadministration.diskused.aspx
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 ?