Find large items in user mailboxes (Exchange 2013)

Sometimes you need to find mailboxes with large items. This is a one liner powershell for finding mailboxes with a messages larger than a value in Exchange 2013.
get-mailbox -resultsize unlimited | Get-MailboxFolderStatistics -IncludeAnalysis | `
 where { $_.topSubjectSize -gt 25MB } | select identity,topsubjectsize | `
 Export-Csv -Path .\LargeItems.csv -Encoding Unicode
This one liner finds items in folders in user mailboxes larger than 25MB. There can however be several items large than 25MB as the command only finds the largest.
A report for finding and reporting individual items will be a later issue.

No comments: