Tuesday, January 27, 2009

Easy Way How to Find SharePoint Subsite Size

Revision: All the following was fine and dandy for SP 2007, and maybe if you don't have access to Powershell. If you do, just do this:

$used = (Get-SPSiteAdministration -Identity ).DiskUsed
$used
_______________________________

I was looking for a GOOD way to find out the size of subsites. It seems a lot of people are struggling with this. You could try SharePoint Designer. That's fun. When you ask it site properties, it will give you a different answer depending on what document libraries or lists you touched. Obviously that is not going to be reliable.

I'll cut to the chase (although I was trying to be as wordy as possible). This isn't a GOOD way, but it is a very simple way: 

  • open the site in Windows Explorer
  • navigate to the root of the site or subsite in question
  • right click, properties

That may be a little resource intensive - it takes a while to open. I think it may have to open a lot more than it appears just to get you that number, but there it is in the properties window. Piece of cake.

Post Script: http://www.codeplex.com/SPUsedSpaceInfo is a console app to get a CSV listing of sites and their size. Beware that the setup is pretty heavy handed - a Dotnet 3.5 SP1 installation starts right up if you aren't there already. 

5 comments:

  1. Anonymous1:52 PM

    This doesn't seem to work for me. One of my top level sites is coming up as 0 bytes. One of my other sites is coming up as 450 MB when I'm sure it's much more than that.

    ReplyDelete
  2. Anonymous2:16 PM

    Its not wokring for the 2010 sites

    ReplyDelete
  3. Anonymous5:25 PM

    This does not work for me either; the number of documents is different than an all files report from SharePoint designer. I am not sure what all the properties is pulling.

    The closest I have come to accurate is comparing pulling the all files report and version history report and multiplying, now mind you this is not correct either, but it is closer than anything else I have found without touching the server.

    The CodePlex app is the best, I ran several tests in a virtual environment with success, but you have to access the server, so if that is not an option for you it is out.

    ReplyDelete
  4. I tried to find the codeplex app - but the site appears to be empty when I visit it. Perhaps it has been deleted?

    ReplyDelete
  5. I don't know if this is really an accurate way of measuring the size of a site. In fact, it may be horribly inaccurate depending on the type of data your site contains. What if you have versioning enabled? The Explorer View/WebDAV is only going to show you the most recent major version of a file. That's all that's visible in explorer, the only thing that counts towards item count, and (presumably) the only thing that's going to count towards enumerating how much data the folders contain. Those versions are still taking up space, sometimes quite a lot of it, and are in your database. It's just hidden from WebDAV.

    ReplyDelete