A common task amongst many Exchange administrators around the world is moving users’ mailboxes between databases. This could be to move the user to a database with a higher quota limit, because the user moved to a different location so we want to move his mailbox to an Exchange server closer to his new location, simply because of an Exchange transition/migration, or for many other reasons.
Whatever the case might be, Exchange keeps track of these mailbox moves in case we need to find out, for example, where a mailbox was located before. To access this information, we need to run the Get-MailboxStatistics cmdlet against the mailbox we want to check and use the IncludeMoveHistory switch, such as follows (some output has been removed for brevity):
Get-MailboxStatistics nuno –IncludeMoveHistory | FL
(Get-MailboxStatistics nuno –IncludeMoveHistory).MoveHistory
Status : Completed Flags : IntraOrg, Pull SourceDatabase : MDB2 SourceVersion : Version 14.3 (Build 224.0) SourceServer : server2.nunomota.pt SourceArchiveDatabase : SourceArchiveVersion : Version 0.0 (Build 0.0) SourceArchiveServer : TargetDatabase : MDB01 TargetVersion : Version 15.0 (Build 1076.0) TargetServer : server1.nunomota.pt TargetArchiveDatabase : TargetArchiveVersion : Version 0.0 (Build 0.0) TargetArchiveServer : BadItemLimit : 0 BadItemsEncountered : 0 LargeItemLimit : 0 LargeItemsEncountered : 0 QueuedTimestamp : 6/18/2017 12:51:20 PM StartTimestamp : 6/18/2017 12:51:26 PM FinalSyncTimestamp : 6/18/2017 12:52:17 PM CompletionTimestamp : 6/18/2017 12:55:16 PM OverallDuration : 00:03:55.2744307 TotalFinalizationDuration : 00:02:57.7932767 TotalSuspendedDuration : 00:00:00 TotalFailedDuration : 00:00:00 TotalQueuedDuration : 00:00:00.7499765 TotalInProgressDuration : 00:03:54.5244542 TotalStalledDueToHADuration : 00:00:00 TotalTransientFailureDuration : 00:00:00 MRSServerName : server2.nunomota.pt TotalMailboxSize : 51.25 MB (53,742,458 bytes) TotalMailboxItemCount : 669 Message : FailureTimestamp : Report :
“The IncludeMoveHistory switch specifies whether to return additional information about the mailbox that includes the history of a completed move request, such as status, flags, target database, bad items, start times, end times, duration that the move request was in various stages, and failure codes.”
The number of moves that are kept in Exchange will depend what version of Exchange you are running. For Exchange 2010 the default value is 2 while for 2013 it is 5. However, this number can be customized by editing the Mailbox Replication Service (MRS) configuration. To do this, open the MsExchangeMailboxReplication.exe.config file, which by default is located at C:\Program Files\Microsoft\Exchange Server\V15\Bin, using Notepad with Admin rights. Then, go to the MRSConfiguration section and update the MaxMoveHistoryLength setting with a value between 0 and 100.
To get a higher level of detail, we can instead use the IncludeMoveReport switch. This switch specifies whether to return a verbose detailed move report for a completed move request, such as server connections and move stages.