We have a requirement to collect statistics on all mail with file attachments. Namely, which file types are being attached and in what quantities by our users on our Exchange server. Is there a way to achieve this either out-of-box or with plug-ins or other tools?

The only method I've found so far is to run the export-mail command searching for file attachments using a wildcard to return all mail with file attachments but this would be unfeasible since it would either (I'm not sure) move mail from all our users mailboxes to another or duplicate all mail with file attachments which we don't really have space for and either way manually collecting statistics on that amount of mail would take forever.

1 Answer 1


You might try giving the Microsoft Exchange Server Profile Analyzer a try - download link. I believe it can get the info you are looking for although I have never used it, and I am running Exchange 2010, which the tool apparently doesn't support.

Edit: (A different approach): If you are running AV on your Exchange server, you might be able to create a rule that snags attachment types for reporting purposes only. Create a rule to filter for attachments, but don't take any action on the message. Then you might be able to run a report on the rule to get the info you are looking for...

Second edit: Take a look at Transport Rules. I believe you can add a rule to grab attachments matching a file name pattern and log occurrences to the Application log. You can then sort through the Event Log with a powershell script to get your statistics.

  • I tried that first, it doesn't return information on content of messages such as file attachments. It gives you activity statistics such as how much mail, from what sender, to which recipients, size of messages, etc.
    – Tony
    Commented May 31, 2012 at 14:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .