Determining size of SharePoint sites / site collections

Mayo picture Mayo · Oct 21, 2009 · Viewed 38.9k times · Source

I'm about to start googling but figured I'd start here. We already found a VB script that enumerates SharePoint site collections / sites. It calls stsadm to achieve this and it recursively evaluates each site to get the sub-sites.

I would like to know if we can modify that script to get the size (in bytes) of each site collection / site.

We're using MOSS 2007.

EDIT: I found a related question on SO but didn't see an answer for the disk space question.

Answer

Mayo picture Mayo · Oct 21, 2009

You can get the site collection's size in MB.

stsadm -o enumsites -url http://url

<Sites Count="1">
  <Site 
    Url="http://url" 
    Owner="A\user" 
    SecondaryOwner="A\user2" 
    ContentDatabase="WSS_Content_DB"
    StorageUsedMB="13756" 
    StorageWarningMB="0"
    StorageMaxMB="0" />
</Sites>

Will update if I find a method for sites/subsites.