Export Mailboxes in Exchange 2010 Corrupted Items Work-a-round

Written by James McDonald

February 17, 2015

# You get the mailbox sizes
Get-MailboxStatistics -Server MYSBS2011SERVER | where {$_.ObjectClass –eq “Mailbox”} | Sort-Object TotalItemSize –Descending | ft @{label=”User”;expression={$_.DisplayName}},@{label=”Total Size (MB)”;expression={$_.TotalItemSize.Value.ToMB()}},@{label=”Items”;expression={$_.ItemCount}},@{label=”Storage Limit”;expression={$_.StorageLimitStatus}} -auto

# when you do an export with this command and check the resulting file sizes you find some aren't 
# the right size and you can't open them with outlook
New-MailboxExportRequest -Mailbox jamesm -FilePath \\servername\mailbox_export\jamesm20150216.pst

# so run a command to get the failed exports and view the detail and you find
# corrupted items encountered
Get-MailboxExportRequest -Status Failed | Get-MailboxExportRequestStatistics -IncludeReport | Format-List > AllExportReports.txt

# If you look in the mailbox using outlook and find the corrupted items
# they can be either truly corrupt or some weird character sets
# that the mailbox export chokes on

# next step is to do the export but specify the BadItemLimit and AcceptLargeDataLoss
New-MailboxExportRequest -Mailbox jamesm -FilePath \\servername\mailbox_export\jamesm20150216.pst -BadItemLimit 1000 -AcceptLargeDataLoss




Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…


If you have Veeam backup failing with the Updating BCD failed with Cannot update SafeBoot flag and SentinelOne is...