Powershell Script on Attachment Size
The boss would like a report on attachment size. Attachements greater than 25mb for the past 30 days.
Does anyone know of a Powershell script that could assist in this?
Thanks
Ron
January 22nd, 2011 11:06am
If you need the actual attachment sizes you'll need to open the mailboxes and examine the emails (I'd suggest using the EWS managed API for that).
Rather than digging through all the mailboxes, you might be better off running a script against the message tracking logs, and pulling out the sender and messageids of any email over 25 MB and then use that to go after the attachment information.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
January 22nd, 2011 11:37am
Hi Ron,
Also you can try to export the messages larger than 25MB in the past 30 days to a target mailbox. And then audit the attachment size which is larger
than 25MB.
For detailed, please refer to the following link.
Exchange Server 2007 Export Mailbox task:
http://msexchangeteam.com/archive/2006/11/28/431669.aspx
Export-Mailbox:
http://technet.microsoft.com/en-us/library/aa998579(EXCHG.80).aspx
Best regards,
Serena
Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
January 28th, 2011 3:15am