Exchange 2010 : Deleted Items Retention Size Report

Exchange 2010 : Deleted Items Retention Size Report

The following script will generate a CSV file that reports on per-user Deleted Items Retention (Dumpster 2.0) sizes.

{code lang:php title:”Mailbox Deleted Items Retention Report” lines:false hidden:false}$data = @()
foreach($mbx in get-mailboxdatabase | get-mailbox)
{
$data += Get-MailboxStatistics $mbx.identity | Select @{n=”DisplayName”;e={$_.DisplayName}},@{e={$_.TotalDeletedItemSize.Value.ToMB()};n=”TotalDeletedItemsSize(MB)”},DeletedItemCount
}
$data | export-csv retention.csv{/code}