Take the 2-minute tour ×

I have a few users whose mailboxes seem to grow much more rapidly than others. For example we archived off a load of mail from one particular user less than a year ago to get his mailbox down to about 4GB (yes - I know, that's ridiculous, but we're running a project to implement auto-archiving / quotas etc).

Anyway, I want to know if there is a (preferably free) tool available that we can use to analyse the mailbox in terms of volumes/sizes of attachments. Something like TreeSize, but for Outlook OSTs (or even at source at the server).

(We're running Exchange 2003 SP2, Outlook 2010 clients)

share|improve this question

3 Answers 3

up vote 0 down vote accepted

As for free products: there are many tools for creating reports and gathering statistics at OutlookFreeware.com and I'm one if the developers. In particular, Attachment Report and Largest Folders can be very useful for you.

share|improve this answer

There's nothing native to Exchange server 2003 that will give you the information you need, but there's an entire industry built around Exchange management and reporting. This is just one of the tools available:


share|improve this answer

Actually, you can get to some of that information via WMI.

Here's an example in Perl that I'd put together for a similar purpose:

#! /usr/bin/env perl

use strict;
use warnings;
use Win32::OLE('in');

use constant wbemFlagReturnImmediately => 0x10;
use constant wbemFlagForwardOnly => 0x20;

print "Mailbox,Size (KB),Total Items,Last Logon Time,Last User\n";

my @computers = qw ( mailserver1 mailserver2 etc);  #array off all mail servers, separated by spaces
foreach my $computer (@computers) {
    my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\MicrosoftExchangeV2") or die "WMI connection failed.\n";
    my $colItems = $objWMIService->ExecQuery("SELECT * FROM Exchange_Mailbox", "WQL",
            wbemFlagReturnImmediately | wbemFlagForwardOnly);

    foreach my $objItem (in $colItems) {
        my $mailboxDisplayName = $objItem->{MailboxDisplayName} || "NULL";
        my $size = $objItem->{Size} || "NULL";
        my $totalItems = $objItem->{TotalItems} || "NULL";
        my $lastLogonTime = substr($objItem->{LastLogonTime},0,8) || "NULL";
        my $lastUser = $objItem->{LastLoggedOnUserAccount} || "NULL";

        #next unless $mailboxDisplayName;
        print "$mailboxDisplayName,$size,$totalItems,$lastLogonTime,$lastUser\n";

You need perl installed and the Win32::OLE module, but it's pretty easy. Run it from the command line by executing perl scriptname.pl, and capture to a .csv file by running perl scriptname.pl > report.csv

This WMI Class can't get you Attachment info, but it can give you the number of messages and the mailbox size.

share|improve this answer

Your Answer


