Date: 
Monday, July 20, 2009
Title: List Quota and Locklevel of all Site Collections in Farm
Here is another small utility requested in one of the SharePoint newsgroups
It creates a tab delimited list of all the Site Collections in the current farm
using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
namespace ListQuotas
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Site Coll name\tSite Coll Url\tIs ReadLocked\tIs WriteLocked\tQuota in bytes");
SPSecurity.RunWithElevatedPrivileges(delegate
{
foreach (SPWebApplication webapp in SPWebService.ContentService.WebApplications)
{
foreach (SPSite sitecoll in webapp.Sites)
{
Console.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}",
sitecoll.RootWeb.Title,
sitecoll.Url,
sitecoll.ReadLocked,
sitecoll.WriteLocked,
sitecoll.Quota.StorageMaximumLevel);
sitecoll.RootWeb.Dispose();
sitecoll.Dispose();
}
}
});
}
}
}
The executable can be found here and the source code here
|
Disclaimer: The opinions expressed herein are my own personal opinions and do not represent
my employer's view in any way. And all information or programs are without warranty. Use at your own risk
© Copyright 2013 
Per Jakobsen
|
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| 28 | 29 | 30 | 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | 1 |
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Navigation
Categories