Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Scanning a Mailbox - Redemption Version

Created: 29 Oct 2012 • Updated: 31 Oct 2012
Rob.Wilcox's picture
+2 2 Votes
Login to vote

Sometimes it is desirable to scan a particular mailbox to see how many items there are in the mailbox, how many pending items there are, and how many archived items there are.

This small executable allows you to do that.  You run it on any machine after installing Redemption - and you can use the 'demo' version of that.

The command line to run is :

CountItems.exe exch1 jeff1 1
 
The output looks like this:
 
**********************************

**   Count Items in a mailbox.  **

**********************************


Output format is folder name then 'Number of Items' / 'Number of Pending Items'

/ 'Number of Archived Items'



Exchange Server: exch1

Mailbox Name   : jeff1




Results:


Num Items     : 15312

Num Pending   : 0

Num Archived  : 13365



Size Items    : 44269086 (bytes), 43231 (Kb), 42 (Mb), 0 (Gb)

Size Pending  : 0 (bytes), 0 (Kb), 0 (Mb), 0 (Gb)

Size Archived : 24965744 (bytes), 24380 (Kb), 23 (Mb), 0 (Gb)
 

If you run it with the third parameter being 0 then you see this:

CountItems.exe exch1 jeff1 0


**********************************

**   Count Items in a mailbox.  **

**********************************


Output format is folder name then 'Number of Items' / 'Number of Pending Items'

/ 'Number of Archived Items'



Exchange Server: exch1

Mailbox Name   : jeff1



        Top of Information Store 0/0/0

         1Year 0/0/0

         1Year-testsubs 0/0/0

          s1 0/0/0

         Archived Mail 0/0/0

          Large 0/0/0

           LargeItems 500/0/500

         Calendar 1/0/0

         Contacts 1/0/0

         Conversation Action Settings 0/0/0

         Deleted Items 0/0/0

         Drafts 0/0/0

         Inbox 1950/0/22

          100 items 2 0/0/0

          1000 items 4035/0/4035

           jashd kasdk jahsdkj ahsdkjashd kajshd kajsdh 0/0/0

          archiveleaverstestfolder 1310/0/1310

          EVArchiveSize 1584/0/1584

          modified ret cat 931/0/931

          s2 3044/0/3044

          sub2.5 0/0/0

          sub3 0/0/0

          TestFolder1 1883/0/1883

         Journal 0/0/0

         Junk E-mail 0/0/0

         News Feed 0/0/0

         Notes 0/0/0

         Outbox 0/0/0

         Private1 0/0/0

         Quick Step Settings 0/0/0

         Restored Items 0/0/0

           28/03/2012 13:52:26 0/0/0

           28/03/2012 13:53:37 0/0/0

           28/03/2012 13:54:12 0/0/0

         RSS Feeds 0/0/0

         Sent Items 73/0/56

         Suggested Contacts 0/0/0

         Sync Issues 0/0/0

          Conflicts 0/0/0

          Local Failures 0/0/0

          Server Failures 0/0/0

         Tasks 0/0/0

         TestFolder2 0/0/0

         x1 0/0/0

          J123 0/0/0

          Personal Folders 0/0/0

           t1 0/0/0

          Personal Folders 1 0/0/0

           alpha1 0/0/0

          Personal Folders 2 0/0/0

           jongo1 0/0/0


Results:


Num Items     : 15312

Num Pending   : 0

Num Archived  : 13365



Size Items    : 44269086 (bytes), 43231 (Kb), 42 (Mb), 0 (Gb)

Size Pending  : 0 (bytes), 0 (Kb), 0 (Mb), 0 (Gb)

Size Archived : 24965744 (bytes), 24380 (Kb), 23 (Mb), 0 (Gb)
 
The parameters are :

Exchange Server Name

Mailbox Name

1 or 0 to indicate SUMMARY mode or non-summary mode

I've included the binary, and the source.

The one caveat with this is that it doesn't detect archived items which aren't shortcuts - ie calendar items, and tasks.