Powershell Command to Export User mailbox Propertes

Below Powershell command can be used to export the list of mailboxes properties like DisplayName, totalItems,ItemCount for the list of users given in a text file to a export to a csv file

Get-Content “C:\name.txt” | Get-Mailbox | Get-MailboxStatistics | Select DisplayName,TotalItemSize,ItemCount| Export-Csv c:\MailboxStatistics.csv
Get-Content “C:\name.txt” | Get-Mailbox | Get-MailboxStatistics | Select DisplayName,{$_.TotalItemSize.Value.ToMB()},ItemCount| Export-Csv c:\MailboxStatistics.csv
Get-Content “C:\name.txt” | Get-Mailbox | Get-MailboxStatistics | Select DisplayName,{$_.TotalItemSize/1.0MB},ItemCount| Export-Csv c:\MailboxStatistics.csv
Get-Content “C:\name.txt” | Get-Mailbox | Get-MailboxStatistics | Select DisplayName,{$_.TotalItemSize.Value.ToGB()},ItemCount| Export-Csv c:\MailboxStatistics.csv

Powershell to Move Multiple Mailboxes in Multithread

This is a Beautiful piece of code which helps in moving the Multiple mailboxes in Multithread.

Sourcefilepath contact the text file with the list of alias names or email address of the users to move.
TargetDatabase should have the path of the destination store where mailstore to be moved.
Maxthreads 8 will move 8 users at a time, you can increase this count based on the performace of your machine.
-BadItemsLimit is if mailbox which is moved has some corrupted item then move-mailbox wil skip the corruption upto 30 items. If this corsses then specific mailbox will not be moved, but it will continue to move rest of the mailbox.

$TargetDatabase = “Path to the destination Store”
$k = Get-Content “SourceFilepath”
$k| Get-Mailbox | Move-Mailbox -BadItemLimit ’30’ -TargetDatabase $TargetDatabase -maxthreads 8 -Confirm: $false