Managing Mailbox moves in Exchange 2016

Have Exchange manage mailbox moves without changing server settings

I manage a 5-server Exchange 2016 DAG at my workplace. Recently, I needed to migrate about 60 users from one database to another. I happen to hate the browser-based Exchange Administration Console (EAC) because it’s not very helpful - there’s no way to see the status for many “in progress” tasks, and cancelling a task generally means you have no way of knowing if was completely cancelled, or partially cancelled… very frustrating!

I have a love for Powershell, so I fired up the EMC - hurrah!
The default number of active migrations is configurable via. Powershell, but I really don’t like changing server defaults if there’s another way to accomplish what I want. Changing server defaults means that there’s one more configuration variation that needs to be tracked in case I need to rebuild a server, or add another server to the DAG.

Generally speaking, I like to:

  • Migrate all mailboxes
  • Suspend all Move Requests
  • Have Powershell report on the status of the migration every 30 seconds:
    While (Get-MoveRequest | Where-Object {$_.status -ne "InProgress"}){
        Clear-Host; Get-MoveRequest | Where-Object {$_.status -eq "InProgress"} | Get-MoveRequestStatistics | sort PercentComplete -Descending
        Start-Sleep -Seconds 30
        }
    
  • Open a second EMC instance and have Powershell ensure there are 5 migrations happening concurrently. If there aren’t, resume another one:
    While ((Get-MoveRequest | Where-Object {$_.status -eq "suspended"}).count -gt 0){
        If ((Get-MoveRequest | Where-Object {$_.status -eq "inprogress"}).count -lt 5){
            (Get-MoveRequest | Where-Object {$_.status -eq "suspended"})[0] | Resume-MoveRequest
            }
            Start-Sleep -Seconds 300 
        }
    

I also like to make sure that Indexing is disabled when migrating mailboxes: Set-MailboxDatabase tier3-d -IndexEnabled:$false
This helps to speed up the process, since Exchange isn’t trying to index the mailbox as the move is occurring.

If you don’t disable the indexing, you may see your migration slow to a crawl, with the error StalledDueToTarget_ContentIndexing. Oof.

After the move is complete, be sure to enable Indexing again, or your users won’t be able to search: Set-MailboxDatabase tier3-d -IndexEnabled:$true
Then, validate that Indexing is set correctly on all the databases: Get-MailboxDatabase | Select Name,IndexEnabled

Built with Hugo
Theme Stack designed by Jimmy