How to monitor Exchange 2010 mailbox moves real-time

I am in the middle of a large Exchange 2003 to Exchange 2010 migration. Moving a few large mailboxes at a time can be a time-consuming thing, especially when I don’t know if the moves are complete. This little snippet allows me to keep an eye on a console window and see when various moves are complete.

This script will keep completed moves in the display:

while ($true) { Get-MoveRequest | Get-MoveRequestStatistics; Start-Sleep -Seconds 2; Clear-Host; }

This script will hide completed moves from the display:

while ($true) { Get-MoveRequest | Get-MoveRequestStatistics | Where {$_.Status -ne "Completed"} ; Start-Sleep -Seconds 2; Clear-Host; }

This script will only show completed moves:

while (1 -eq 1) { Get-MoveRequest | Get-MoveRequestStatistics | Where {$_.Status -eq "Completed"} ; Start-Sleep -Seconds 2; Clear-Host; }

Not an overly in-depth blog post, but will probably come in handy for someone. This could also be expanded to email upon move completion or failure, if there’s enough interest I’ll write that up too.

Written on March 25, 2011