Hello exchange pros,
I've been trying to export the mailboxes from my exchange servers (4 servers in the DAG) one database at a time with this command (unlimited baditems is fully intended):
$AllMailboxes = Get-Mailbox -Database "database"
$Path = "\\servername\exportfolder"
foreach ($Mailbox in $AllMailboxes)
{ New-MailboxExportRequest -Mailbox $Mailbox.alias -FilePath "\\$Path\$($Mailbox.SAMAccountname).pst" -baditemlimit unlimited }
The thing is the exports are extremely unreliable. In every batch i have multiple empty PSTs (size = 265kb) but the mailboxes aren't empty and multiple hugely blown up PSTs.
One example:
Size of the PST: 79,5 GB (85.390.615.552 bytes)
Result of Get-MailboxStatistics mailbox| Format-List StorageLimitStatus,TotalItemSize,TotalDeletedItemSize,ItemCount,DeletedItemCount
StorageLimitStatus :
TotalItemSize : 12.8 GB (13,740,861,224 bytes)
TotalDeletedItemSize : 0 B (0 bytes)
ItemCount : 37740
DeletedItemCount : 0
Only a few mailboxes per database behave that way and when i export those mailboxes one at a time, it works fine.

