Exchange Store Size checks

Here are a couple of scripts to check the size of the Exchange Stores. With the 75GB limit in Exchange 2003 and possible personal store located in various areas for Exchange 2007 and beyond, it is useful to have a quick overall glance at the Exchange information all at a go.

For Exchange 2003 and below, you can use Michael B Smith’s (Exchange MVP) scripts found here – For a self installing version of this script, you can download it here –

In Exchange 2007, the STM file was elimited according to Michael, and so the script terminates with an AD error. He has supplied a really quick and dirty Exchange PowerShell script to output the sizes of the stores. Cut and past the following code into notepad and save the file with a .PS1 extension and run this from the Exchange Management Shell.

$totalArray = @()
$totalArray += get-mailboxdatabase -ea 0 |% { dir -ea 0 $_.EdbFilePath | select Name, Length }
$totalArray += get-publicfolderdatabase -ea 0 |% { dir -ea 0 $_.EdbFilePath | select Name, Length }
$totalArray | out-string -width 70
[int64]$totalSize = 0
$totalArray |% { $totalSize += $_.Length }
"Total size of databases {0} bytes, {1} GB" -f  $totalSize.ToString("N0"), ($totalsize / 1GB).ToString("N3")

There are many other scripts out there, which can produce nicely formatted output and possibly more information if required. But I found that this gave me the information I needed quickly.

UPDATE 8/1/2011: Michael has updated his script to work with Exchange 2007 and 2010. You can access the script here –

Michael’s blog contains a depth of great articles and scripts on everything about Exchange –

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve the Equation to continue * Time limit is exhausted. Please reload CAPTCHA.