Wednesday, 16 December 2015

Exchange 2013 to 2016 Migration (Part 4)


In the previous parts of this series, we’ve installed Exchange 2016, configured certificates and virtual directory URLs and then migrated the CAS role.

The next step in the migration will be to migrate data - namely creating mailbox databases then moving mailboxes and public folders so we’ll cover that in this post:

To read other parts in this series, go to:

Rename and move default mailbox database

When we installed Exchange 2016, it installed a default mailbox database which is stored on the C drive. Having a mailbox database on the C drive is not a good idea as this drive should be reserved for just the operating system and it’s generally quite small in most deployments.

To move the default database, first figure out it’s name by running this command:

Get-MailboxDatabase -Server litex02

In our case, the database is called “Mailbox Database 1051570769”
We now rename the mailbox database. To rename the mailbox database to MDB01-LITEX02, run this command:

Set-MailboxDatabase -Identity "Mailbox Database 1051570769" -Name MDB01-LITEX02

We now need to move the database. Use the command below to move the database EDB file to “E:\Program Files\Microsoft\Exchange Server\V15\Mailbox\MDB01-LITEX02\MDB01-LITEX02.edb” and the logs to “E:\Program Files\Microsoft\Exchange Server\V15\Mailbox\MDB01-LITEX02”:

Move-DatabasePath -Identity MDB01-LITEX02 -EdbFilePath "E:\Program Files\Microsoft\Exchange Server\V15\Mailbox\MDB01-LITEX02\MDB01-LITEX02.edb" -LogFolderPath "E:\Program Files\Microsoft\Exchange Server\V15\Mailbox\MDB01-LITEX02"

You’ll be prompted twice - once to confirm you want to do this and the second time to confirm that the database will be dismounted and mounted again. Select yes for both prompts.

Create mailbox databases

The recommendation is to keep non-replicated mailbox databases under 200GB and replicated mailbox databases under 2TB so this may mean you need to create additional mailbox databases. Ideally a DAG is recommended but we’ll cover this in another post.
We will create another mailbox database with the below settings:

  • Name: MDB02-LITEX02
  • Database path: "E:\Program Files\Microsoft\Exchange Server\V15\Mailbox\MDB02-LITEX02\MDB02-LITEX02.edb"
  • Log folder path: "E:\Program Files\Microsoft\Exchange Server\V15\Mailbox\MDB02-LITEX02"

To do this, run the command below:

New-MailboxDatabase -Server litex02 -Name MDB02-LITEX02 -EdbFilePath "E:\Program Files\Microsoft\Exchange Server\V15\Mailbox\MDB02-LITEX02\MDB02-LITEX02.edb" -LogFolderPath "E:\Program Files\Microsoft\Exchange Server\V15\Mailbox\MDB02-LITEX02"

Once done, we need to restart the information store:

Restart-Service MSExchangeIS

Now that our new mailbox database is created, we need to mount our new database:

Mount-Database MDB02-LITEX02

We’re now ready for the next step.

Move mailboxes to Exchange 2016

When moving mailboxes, note that this will generate a lot of log files due to the amount of database changes so make sure that you have space for this and are backups regularly enough to truncate the logs. The other option is to use circular logging but this may have implications on your ability to backup your Exchange server (see your backup documentation). It also means that should you have a failure, you won’t be able to replay log files to bring the server up to the point just before the failure.

You'll need to move all the mailboxes to Exchange 2016 so this includes:

  • Arbitration mailboxes (system mailboxes)
  • Public folder mailboxes
  • User mailboxes (this includes journal mailboxes)
  • Archive mailboxes

Move Exchange 2013 System Mailboxes to Exchange 2016

When our Exchange 2013 server was installed in the organization, it created a number of system mailboxes (arbitration mailboxes). We can list these mailboxes and confirm that they are indeed on our Exchange 2013 server by running this command:

Get-Mailbox –Arbitration


We need to move all of these to Exchange 2016 so to do this, run the following command, specifying our Exchange 2016 mailbox database (MDB01-LITEX02):

Get-Mailbox -Arbitration | New-MoveRequest -TargetDatabase MDB01-LITEX02


You can confirm that the mailboxes have moved by running the command below:

Get-MoveRequest | Get-MoveRequestStatistics


Once these mailboxes are moved, we can move on to the next step.

Move public folder mailbox to Exchange 2016

Moving a public folder mailbox is much simpler now that we don’t need to worry about public folder replication as we did in the Exchange 2003 - 2010 days. It’s great that Microsoft have changed the architecture to make it more manageable.

First, get a list of public folder mailboxes on your Exchange 2013 server:

Get-Mailbox -Server litex01 -PublicFolder

Next, use this command to move the public folder mailbox to Exchange 2016:

New-MoveRequest PublicFolders1 -TargetDatabase MDB02-LITEX02

Move user mailboxes

There’s many different approaches to moving user mailboxes. You can move mailboxes individually, by OU, mailbox database or just move all mailboxes in one go if you don’t have that many.

When you use these commands, the user's archive mailbox is used with their mailbox. If this is not what you want, you can use the -PrimaryOnly switch to move the mailbox only and then use the -ArchiveOnly switch to move the archive mailbox only. I'll show you some examples:

Move a single user mailbox

To move a single mailbox to mailbox database MDB01-LITEX02, run this command. This will move the mailbox and any archive mailboxes associated with it to the same mailbox database.

New-MoveRequest Administrator -TargetDatabase MDB01-LITEX02

Move all user mailboxes in a particular database

To move all mailboxes in a particular database to a particular database (e.g. from “Mailbox Database 0602826091” to “MDB01-LITEX02”):

Get-Mailbox -Database "Mailbox Database 0602826091" | New-MoveRequest -TargetDatabase MDB01-LITEX02

Move a user mailbox but select a completion time

There’s also the option to move a mailbox but suspend it when ready to complete. This enables you to ‘seed’ a move and then complete it quite quickly out of hours if needed. Use the command below to start the move:

New-MoveRequest Administrator -TargetDatabase MDB01-LITEX02 -SuspendWhenReadyToComplete

When you’re ready to complete the move, then you can resume it using this command:

Resume-MoveRequest Administrator

Move an archive mailbox without moving the user's primary mailbox

Get-Mailbox finance2 | New-MoveRequest -TargetDatabase MDB02-LITEX02 -ArchiveOnly

Move a user's primary mailbox without moving the user's archive mailbox

Get-Mailbox finance2 | New-MoveRequest -TargetDatabase MDB02-LITEX02 -PrimaryOnly

Get move request status

Now that we have these move requests in progress, you can use this command to get an update on progress:

Get-MoveRequest | Get-MoveRequestStatistics


In part 4 of this series, we’ve gone through the required steps to create mailbox databases on our Exchange 2016 server and then move the system mailboxes, user mailboxes and public folder mailboxes to our new server.

We’re now well on our way in the migration so let's move on to part 5 where we’ll migrate mail flow from Exchange 2013 to 2016 in preparation to decommission our Exchange 2013 servers. 


  1. Thank you, the article is great. One thing I would add, by using it I needed to create a new OAB on new server, and attach it to the destination database. Which would go something like that:
    show OABs attached to mailbox databases:
    Get-MailboxDatabase|fl *offline*
    if there is no OAB attached on the new database, get GAL and names
    Get-OabVirtualDirectory -server newservername
    create OAB according to the names, e.g. it can look like this:
    New-OfflineAddressBook -Name "Exch2016OAB" -AddressLists "Default Global Address List" -VirtualDirectories "OAB (Default Web Site)"
    get the name of the new-server mailbox database:
    set the newly created OAB to the mailbox database on new server:
    Set-MailboxDatabase -Identity newservermailboxdbname -OfflineAddressBook "Exch2016OAB"

  2. This comment has been removed by the author.

  3. This comment has been removed by the author.

    1. This comment has been removed by the author.

  4. Great article, but I'm having one major issue. I am migrating from an Exchange 2013 environment (single server) and installed 2016 on a new VM. I got everything working on the CAS side just perfectly, but still had two different databases. I decided to keep the new db on the 2016 server and just move the mailboxes over. That's how I found your article (searching for "rename exchange default database").

    I followed your instructions to a tee, but now the transport service refuses to start on the 2016 service. I've moved all the arbitration mailboxes over to the new DB, but I still have tons of errors about monitoring mailboxes. I believe I was just originally getting the transport service failure messages (errors 1016, 4999 in the application log, and error 7031 in the system log). I turned up logging for the transport service and am now getting TONS of warnings in the application log: (warnings 12025 and 12028 regarding performance logs and error 1016 regarding the transport service failing).

    Not sure where to go from here...

  5. Thanks for sharing this information, it provides step by step how to migrate from exchange 2013 to exchange 2016. I found the really good information from that provides that automated facilitate to migrate public folder between different exchange server.

  6. Thanks for sharing, alternatively You can also download a free trial version of this to test the program.

  7. Nice Explainer. I've had good experience with EdbMails Edb to PST recovery tool - which provides a complete solution to recover Exchange Database (EDB) files. It is quick and uses deep scan to recover most data out of even corrupted databases.It supports public, private folder recovery. And also supports migration to Live exchange and Office 365. Archive mailbox migration is also supported by edbmails

  8. Question.... you mention that you recommend keeping non-replicated mailbox database under 200 GB. Any specific reasons to splitting the databases if its over 200 GB?

  9. Get-Mailbox –Arbitration lists arbitration mailboxes on BOTH servers. As you only want to move mailboxes from Litexo01 shouldn't the subsequent command be..

    Get-Mailbox -Server LITEX01 -Arbitration | New-MoveRequest -TargetDatabase MDB01-LITEX02

  10. great article, but for public folder moves there is a switch missing in the commande (it is important to add the -publicfolder switch if not it will fail.

    Get-Mailbox -PublicFolder -Server Ex2013Mbx | New-MoveRequest -TargetDatabase Ex2016MbxDatabase