Exchange 2013 Move Database to Another Server Powershell

You can move a mailbox in Exchange 2010/2013/2016/2019 to another database with PowerShell. There is another way than with PowerShell. That is with Exchange Control Panel (ECP). I recommend doing it with Exchange Management Shell (EMS). The ECP is not always fast in refreshing the results. In this article, we will move a mailbox to another database with PowerShell.

Table of contents

  • Information
  • Get mailbox information with PowerShell
  • Move mailbox with PowerShell
  • Check mailbox move progress with PowerShell
  • Verify if the mailbox is moved with PowerShell
  • Conclusion

Information

We have a user called John Doe and his e-mail is john.doe@alitajran.com. We want to move the mailbox of the user to another database with PowerShell.

Before moving the mailbox to another database, make sure that you have read the article Exchange database best practice »

Get mailbox information with PowerShell

Let's first check on which database the user is currently on. Run Exchange Management Shell as administrator. You can search by user email address or the name of the user.

          [PS] C:\>Get-Mailbox "john.doe@alitajran.com" | Format-List Database   Database : DB01        
          [PS] C:\>Get-Mailbox "Doe John" | Format-List Database   Database : DB01        

The mailbox of the user resides in database DB01.

Move mailbox with PowerShell

Now that we know that the user resides in database DB01, we want to move the mailbox to another database. We will move the mailbox to database DB02. Let's make use of the New-MoveRequest cmdlet.

          [PS] C:\>New-MoveRequest -Identity "john.doe@alitajran.com" -TargetDatabase "DB02"  DisplayName StatusDetail        TotalMailboxSize               TotalArchiveSize PercentComplete ----------- ------------        ----------------               ---------------- --------------- Doe John    WaitingForJobPickup 4.891 GB (5,251,716,383 bytes)                  0        

Change the identity, if you want to move the mailbox by the name of the user.

          [PS] C:\>New-MoveRequest -Identity "Doe John" -TargetDatabase "DB02"   DisplayName StatusDetail        TotalMailboxSize               TotalArchiveSize PercentComplete ----------- ------------        ----------------               ---------------- --------------- Doe John    WaitingForJobPickup 4.891 GB (5,251,716,383 bytes)                  0        

Check mailbox move progress with PowerShell

The mailbox is moving at the moment. Check the status of the move mailbox. Make use of the Get-MoveRequest cmdlet and Get-MoveRequestStatistics cmdlet.

          [PS] C:\>Get-MoveRequest | Get-MoveRequestStatistics  DisplayName StatusDetail    TotalMailboxSize               TotalArchiveSize PercentComplete ----------- ------------    ----------------               ---------------- --------------- Doe John    CopyingMessages 4.891 GB (5,251,716,383 bytes)                  84        

Messages are being copied. Run the command again.

          [PS] C:\>Get-MoveRequest | Get-MoveRequestStatistics  DisplayName StatusDetail TotalMailboxSize               TotalArchiveSize PercentComplete ----------- ------------ ----------------               ---------------- --------------- Doe John    Completed    4.891 GB (5,251,716,383 bytes)                  100        

When the mailbox is completely moved, you will see that john.doe@alitajran.com is 100% completed.

Verify if the mailbox is moved with PowerShell

Check if the user is moved to the new database DB02.

          [PS] C:\>Get-Mailbox "john.doe@alitajran.com" | Format-List Database   Database : DB02        

Great, the user is moved to DB02 with success. Will you move another mailbox to Exchange 2010/2013/2016/2019 with PowerShell?

Read more: Move all mailboxes from one database to another »

Conclusion

In this article, you learned how to move a mailbox in Exchange 2010/2013/2016/2019 to another database with PowerShell. I hope you can make good use of these commands and that a mailbox migration to another database went great. It's always good to keep these commands by your side if you need to move a mailbox to Exchange 2016 in the future.

If you enjoyed this article, you may also like Cleanup logs Exchange 2013/2016/2019. Don't forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

Exchange 2013 Move Database to Another Server Powershell

Source: https://www.alitajran.com/move-mailbox-to-another-database-with-powershell/

0 Response to "Exchange 2013 Move Database to Another Server Powershell"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel