Thursday, January 5, 2012

Command to find out how many items in each users Sent Items

Today I put together a quick command to explore how many items are in each users sent items which I would like to share with you. This command ignores any users mailbox who does not have any items in the sent items folder.

Get-Mailbox | Get-MailboxFolderStatistics -FolderScope SentItems | Where {$_.ItemsInFolder -gt 0} | Sort-Object -Property ItemsInFolder -Descending | select-object Identity,ItemsInFolder | export-csv c:\test.txt


  1. Nice,

    i was looking for something like this.

    is it also possible to search to see what user have emails that have attachment(s) that total more that 25meg. I am getting ready to do a o365 migration and from what i read you cant move emails that hit this limit



  2. You can use a multi-mailbox search in Exchange 2010 to determine this. Filtering includes: sender, receiver, expiry policy, message size, sent/receive date, cc/bcc, regular expressions, Right Protected items

    You can possibly also leverage Messaging Record Management to organise large messages to a certain folder which you can then query.