Question : List Exchange users with mailbox limits above a certain value

What is a way that I can list the users in my various information stores that have their limits set at or above a certain value?

For example, what are the usernames of my users that have prohibit send and receive above 1 GB?

I'm running Exchange 2003.

Answer : List Exchange users with mailbox limits above a certain value

Here is a solution that include folder size and folder size with the size of its subfolders. In line 28 changing "size" to "fullsize" at sort-object you can choose to sort by the total subfolder size.
In the same row I set 100 as the maximum number of results at select-object. You can also adjust it according to your needs.
This code runs on my laptop for about 4 minutes for the root of C drive, so be patient.
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:
Write-Host "$(get-date) Collecting file information..." -ForegroundColor Green
$sh = @{}

Get-ChildItem c:\ee -Recurse -Force -ErrorAction SilentlyContinue | ?{$_.directory} | 
	%{
		if($sh.($_.directory.fullname)){
			$sh.($_.directory.fullname).size+=$_.length
			$sh.($_.directory.fullname).fullsize+=$_.length
		}
		else{$sh.($_.directory.fullname) = @{size = $_.length; fullsize = $_.length}}
	}

Write-Host "$(get-date) Calculating subfolder size information..." -ForegroundColor Green	
$ofs="\"
$sh.keys | %{
	$dirs = $_ -split "\\"
	$curr = $_
	0..($dirs.Count-2) | %{"$($dirs[0..$_])"} | %{if($_[-1] -eq ":"){$_+"\"}else{$_}} | 
		%{
			if($sh.$_) {
				$sh.$_.fullsize += $sh.$curr.size
			}
		}
} 
Write-Host "$(get-date) Emitting results..." -ForegroundColor Green	
$sh.Keys | %{
	New-Object -TypeName PSObject -Property @{name = $_; size = $sh.$_.size; fullsize = $sh.$_.fullsize}
} | Sort-Object size -Descending | select-object -first 100 | ft name, 
		@{n="size (GBs)"; e={$_.size/1gb}; f="n2"}, 
		@{n="size including subfolders (GBs)"; e={$_.fullsize/1gb}; f="n2"}
Random Solutions  
 
programming4us programming4us