问题
I'm looking for the stsadm command that will list all site collections and their size on disk. Thanks.
回答1:
This will output the site collection list into a file called sites.xml, which can be used in other stsadm commands, like mergecontentdbs
stsadm -o enumsites -url http://MySharePointSite > C:\sites.xml
Note that this can take a long time if there are lots of site collections - it takes 2 hours on my SharePoint system.
Edit: Added commands for subwebs:
For the subwebs, you can use the enumsubwebs command, passing it the root url of the site collection to enumerate:
stsadm -o enumsubwebs -url http://MySharePointSite
However, this doesn't give you the size of the web, nor does it output the value for the root web in the site collection, nor does it recurse, so you don't get the subwebs of the subwebs. Its just a list of top-level subwebs.
You can get a complete list of all the webs in a content database with the new enumallwebs command:
stsadm -o enumallwebs -databasename MyContentDatabaseName
Unfortunately, it doesn't give you the size of the web either.
来源:https://stackoverflow.com/questions/1226117/sts-adm-command-for-moss-2007