cancel
Showing results for 
Search instead for 
Did you mean: 
Rob_Wilcox1
Level 6
Partner

A question came up the other day relating to whether or not it's possible to scan through a mailbox, and find the number and size of archived items.

I put together this relatively simple VBScript which demonstrates how to do it.

You do get a "pop-up", and it, of course, requires CDO.  You should be able to run it from a machine running Outlook 2003 or Outlook 2007 (provided you've got CDO installed, as I mentioned).  It also needs (at the moment) for you to be logged on as the user you want to check, and Outlook to have been run once.  Finally you can see near the top of the script where you need to edit it for your Exchange Server name, and mailbox which you wish to scan.

 

You will need to download the file, and rename it/save it with a VBS extension, then run it using (for example) :-

 

cscript scanner.vbs

 

The output will look like this :

 

 

 C:\temp>cscript scanner.vbs

Microsoft (R) Windows Script Host Version 5.7

Copyright (C) Microsoft Corporation. All rights reserved.


Processing started at : 5/10/2011 4:29:18 PM

Scanning mailbox : Alberto

-------------------------------------

Top of Information Store : 2

  Calendar : 0

  Contacts : 0

  Deleted Items : 0

  Drafts : 0

  Inbox : 7

      test123 : 2

         j : 0

      XXMyfolder : 0

  Journal : 0

  Junk E-mail : 0

  Notes : 0

  Outbox : 0

  RSS Feeds : 0

  Sent Items : 8

  Tasks : 0

---------------------------------------

Number of items in the mailbox : 19

Total size : 70968 Bytes, 69.3 Kbytes, 0.07 Mb

Number of archived items : 4

Archived items size : 8040 Bytes, 7.85 Kbytes, 0.01 Mb

Number of pending items : 0

Pending items size : 0 Byes, 0 Kbytes, 0 Mb

---------------------------------------

Processing finished at : 5/10/2011 4:29:21 PM 
Version history
Last update:
‎05-10-2011 02:36 PM
Updated by: