In the previous article, we did configure DKIM record for Office 365. Before installing Azure…
Complete migration batch with PowerShell
How to complete a migration batch with PowerShell in Exchange Online manually? You created new batches and the mailboxes are in sync between Exchange On-premises and Exchange Online. To finish the migration, you need to complete the batches. After that, the destination of the mailbox is in Exchange Online. In this article, you will learn how to complete a migration batch in Office 365 with PowerShell.
What if you want to complete an individual mailbox from the migration batch? Read more in our article complete individual mailbox move request from migration batch
Table of contents
Get migration batch
Run and connect to Exchange Online PowerShell. Run the cmdlet Get-MigrationBatch to get the migration batches. There are two migration batches created. Both batches are in sync between the Exchange organizations (On-premises and Online).
1 2 3 4 5 6 |
PS C:\> Get-MigrationBatch Identity Status Type TotalCount -------- ------ ---- ---------- Migration Batch 01 Synced ExchangeRemoteMove 5 Migration Batch 02 Synced ExchangeRemoteMove 13 |
Complete migration batch
Run the cmdlet Complete-MigrationBatch to complete the migration batch in Office 365.
1 |
PS C:\> Complete-MigrationBatch -Identity "Migration Batch 01" |
A message will show if you are sure, click Yes to All.
Do you get a bad encountered confirmation prompt? Read the article complete mailbox migration with bad items.
If you don’t want to show the confirmation prompt and immediately start completing the migration batch, add –Confirm:$False switch at the end of the cmdlet. It will look like the following.
1 |
PS C:\> Complete-MigrationBatch -Identity "Migration Batch 01" -Confirm:$False |
Verify batch move request
Run the Get-MoveRequest cmdlet to check the mailbox move request status of the batch.
1 2 3 4 5 6 7 8 9 |
PS C:\> Get-MoveRequest –BatchName "MigrationService:Migration Batch 01" | Get-MoveRequestStatistics DisplayName StatusDetail TotalMailboxSize TotalArchiveSize PercentComplete ----------- ------------ ---------------- ---------------- --------------- Curt Berry IncrementalSync 67.87 MB (71,171,939 bytes) 0 B (0 bytes) 95 Stan Benitez WorkItemPickup 48.22 MB (50,562,011 bytes) 0 B (0 bytes) 95 Steven Lyman IncrementalSync 322.8 MB (338,493,950 bytes) 0 B (0 bytes) 95 Julia Thomson IncrementalSync 1.768 GB (1,897,912,196 bytes) 0 B (0 bytes) 95 Amelia Springer WorkItemPickup 1.147 GB (1,231,440,391 bytes) 0 B (0 bytes) 95 |
If you have configured your email when creating the batches, you will get an email when it’s completed. If you didn’t do that or you like to keep track with PowerShell, keep running the cmdlet. In the end it needs to show PercentComplete: 100% for all the mailboxes.
1 2 3 4 5 6 7 8 9 |
PS C:\> Get-MoveRequest –BatchName "MigrationService:Migration Batch 01" | Get-MoveRequestStatistics DisplayName StatusDetail TotalMailboxSize TotalArchiveSize PercentComplete ----------- ------------ ---------------- ---------------- --------------- Curt Berry Completed 67.87 MB (71,171,939 bytes) 0 B (0 bytes) 100 Stan Benitez Completed 48.22 MB (50,562,011 bytes) 0 B (0 bytes) 100 Steven Lyman Completed 322.8 MB (338,493,950 bytes) 0 B (0 bytes) 100 Julia Thomson Completed 1.768 GB (1,897,912,196 bytes) 0 B (0 bytes) 100 Amelia Springer Completed 1.147 GB (1,231,440,391 bytes) 0 B (0 bytes) 100 |
Run Get-MigrationBatch cmdlet to verify if the batch is completed.
1 2 3 4 5 6 |
PS C:\> Get-MigrationBatch Identity Status Type TotalCount -------- ------ ---- ---------- Migration Batch 01 Completed ExchangeRemoteMove 5 Migration Batch 02 Synced ExchangeRemoteMove 13 |
The migration batch is completed successful to Exchange Online.
Conclusion
In this article, you learned how to complete the migration batch manually with PowerShell. Run Exchange Online PowerShell to manage the Exchange Online settings from the command line. Get the batch names, after that complete the mailbox migration batch.
Did you enjoy this article? You may also like Restart remote computer with PowerShell. Don’t forget to follow us and share this article.
This Post Has 0 Comments