The particular scenario we were looking to find was where the UseDatabaseRetentionDefaults property is set to False. We had discovered 1 mailbox which met this criteria and the RetainDeletedItemsFor property was also set to 0, therefore once a mail item was deleted it was gone. The following command quickly output all of the mailboxes in this scenario:
[PS] C:\WINDOWS\system32>Get-Mailbox | Where {$_.UseDatabaseRetentionDefaults -eq $False} | select Name,UseDatabaseRetentionDefaults,RetainDeletedItemsFor | Export-Csv C:\UseDatabaseRetentionDefaults.csv
This web page has some other useful queries for finding other exceptional mailboxes in Exchange with both LDAP queries and the Management Tools: Find Exceptional Mailboxes in Exchange Environment.
No comments:
Post a Comment