Automatic Mailbox Migration Exchange Server 2016

In this blog post, I’ll show you how I automate my Exchange Server 2016 migration and place mailboxes automatically on Exchange 2016 Databases.

Using automatic mailbox distribution, Exchange Server will select an Exchange Server 2016 mailbox database based on server load, database load etc.

In this post, I’ll use a.CSV file with a list of users and a PowerShell Script to move them, I’ll also exclude one database from automatic distribution.

Exclude Database

In my case, there I have 6 Exchange Server 2016 Databases, however, I going to exclude one of them from the automatic distribution using the cmdlet below.

Set-MailboxDatabase hybrid01 -IsExcludedFromProvisioning $true
Migration

Now that I’m done with exclusion, I’ll create a .CSV file and will use an Exchange PowerShell script to move mailboxes.

The CSV file below takes a username as you can see below.

user
Jason.Hybrid
Michael.Vsphere
Don.Hyper
Simon.Docker

Migration Script

The Exchange PowerShell Script below Will take the .CSV file with all the users and will move them.

As you can see there Is no database option which means that I’m letting Exchange Distribute the mailboxes across all my Exchange 2016 Databases.

Add-PSSnapin *exch*
cd 'C:\files'
Import-Csv .\Musers.csv | foreach {New-MoveRequest $_.user -Verbose }

Things to remember

Please note that Automatic Distribution will work In the local Active Directory Site

Unhealthy and offline databases are excluded from the distribution

Conclusion

For large migration, I strongly recommend using this migration method because it will balance the mailbox across all database and as a result, the load will be balanced as well.


Posted

in

by