How much storage space is my site collection using?

NOTE: This post is just covering SharePoint 2010, and not earlier versions of the product.

imageA common question administrators have in their SharePoint environment is “How much storage space is my site collection using?”

Well, fear not, trusty SharePoint administrators! There are a few ways to skin this cat – and we’re going to take a look at them.


SharePoint Designer

SharePoint Designer – what was once something administrators and power users shuddered at the mere mention of the tool in prior versions of the product, has gotten a makeover. And, also has a lot of additional functionality. For today’s lesson however, we are only going to look at one specific feature of it – the ability to view the storage used for an entire site collection!

If you open up SharePoint Designer to the root site of your site collection, in the main window, once the site is opened under Site Information, you will see, as highlighted below, that it will conveniently display the Total Storage Used of your entire site collection! There! As the big red button on my desk often says after a good firm press… “That was easy!”.


Let’s look at a couple of other methods of getting this information, shall we?

StorMan.aspx – SharePoint 2010 Service Pack 1+

This one requires Service Pack 1 to be installed to be able to utilize this feature. It was not in the RTM version. At the root of your site collection, if you go to Site Actions > Site Settings > Site Collection Administration > Storage Metrics, this will give you details on the usage – such as what sites, lists, libraries, and items are taking up the most space, however, it will not give you a total like our trusty SharePoint Swiss Army Knife – SharePoint Designer does, but, it will allow you to drill down into the usage.


I will also urge you to view Bill Baer’s article on Storage Metrics in Service Pack 1 – which has some great screenshots of the functionality, as well as an overview, available here:


imagePowerShell, one of the other power tools in SharePoint 2010, much more akin to the Ginsu knife, can also serve up the details, and, like the Ginsu knife, allow you to slice and dice the information in a myriad of ways.

Below is an example script to connect to your site collection, and read out all of the usage information.

$site = Get-SPSite

Which gives the following output (storage shown highlighted below in bytes):


To view just the Storage property, and not Bandwidth, Visits, Hits, and DiscussionStorage, you can call this:

$site = Get-SPSite

And only the Storage property with the total bytes will be displayed. You can also do some other cool tricks, such as calculating kilobytes, megabytes, gigabytes and terabytes right from the command line as well, to make the results a bit more readable:


Want more? OK! We can give it to you! Keep reading! (Because, reading is fundamental, you know.)

Web Analytics

Another option to view the storage used, as well as some additional metrics around it, if you have Web Analytics enabled, you can view your usage over time. To see this, go to Site Actions > Site Settings > Site Actions > Site Collection Web Analytics reports


Once there, in the main screen, you can view a summary of the Total Storage Used under Inventory.


And if you click on Storage Usage under Inventory within the quick launch navigation on the left, you can then view reports on storage utilization for your site collection, with a graph of the values so you cane easily visualize the trend in storage usage.



As well as a daily breakdown of the storage used, so you can see how this grows or falls over time.


You can also run reports for any date range since Web Analytics have been enabled, as well as run workflows against this data for alerting and reporting.


I hope you were able to learn something new today… have another method in which you get your site collection storage metrics? Leave it in the comments below for everyone else!

PowerShell script to list all Webs and Site Templates in use within a Site Collection

And one more quick post today, this PowerShell script will iterate through all Webs within a Site Collection, print out their Title, URL, and WebTemplate (Site Template) name.

   1: $site = Get-SPSite "http://yoursite"

   2: foreach ($web in $site.AllWebs) { 

   3:     $web | Select-Object -Property Title,Url,WebTemplate 

   4: }

   5: $site.Dispose()

And again, before you use this – please read this: (and also read the comment by Anders Rask)

SharePoint Site Collection backup failed–site left locked.

Ran into an issue the other day. Was running a site collection backup from Central Administration, when it just flat out failed with a generic error. Didn’t think much of it, until a user could not add any data, nor see the Site Actions menu within a site under that site collection.


I started to investigate – all signs pointed to the content database being locked, but no matter where I looked, I was unable to find just where it was locked up.

First, in Central Administration, I checked to see the status of the site collection. This can be found under Application Management > Site Collections > Configure quotas and locks


The site collection was showing as "Not locked”.

Then, while in Central Admin, I checked to see if the database itself was locked. Under Application Management > Manage content databases

As you can see above – it was not Read-Only.

I then took a look at the database, seeing if it was set to single user, read-only, or if the database was not in ‘NORMAL’ state.


Everything looked fine here. I did some troubleshooting, and could not find the source of the problem. So, I threw out an #SPHelp request on twitter, and sure enough, twitter saves the day again. Sean McDonough (@spmcdonough) replied with the following suggestion.


This is the STSADM equivalent of setting the site collection lock status under Application Management > Site Collections > Configure quotas and locks which we first looked at. I set the database read-only. And then set it back to none, and everything was back and working again! Thanks Sean!


So, in closing, this post has two objectives to it. Number 1 is to show you where you can check/set lock statuses for site collections and content databases. And number 2, if you encounter the same issue I did, how to resolve it, so hopefully after a bit of searching if you run into this error, you can save some sweat and hair, and get your site collection back up and functional.

And then plan to perform the site collection backup off-hours, just in case 🙂

%d bloggers like this: