Quantcast
Channel: Practical 365
Viewing all articles
Browse latest Browse all 515

Completing Individual Move Requests from a Migration Batch

$
0
0

Mark left a comment asking whether he could complete the mailbox moves for only specific mailboxes that were included in a very large migration batch.

Consider a scenario in which you create a migration batch, but some circumstance leads to you wanting to be more selective in which mailbox moves within that batch are completed, instead of initiating the completion for the entire batch.

Although the migration batch is a single object that you can manage, each mailbox move in that batch is still handled as an individual move request.

For example, here is a migration batch with five mailboxes included. I can see all five move requests when I run Get-MoveRequest.

[PS] C:\>Get-MigrationBatch
Identity                        Status                    Type                           TotalCount
--------                        ------                    ----                           ----------
Migration Batch 10              Syncing                   ExchangeLocalMove              5
[PS] C:\>Get-MoveRequest
DisplayName                                    Status                    TargetDatabase
-----------                                    ------                    --------------
Alison Pugh                                    InProgress                DB03
Annette O'sullivan                             InProgress                DB03
Alannah Shaw                                   InProgress                DB03
Chrissie Varney                                InProgress                DB03
Carol Okyere                                   InProgress                DB01

When the migration batch reaches a suspended state (because I did not choose to automatically complete it), I can use Set-MoveRequest to set the SuspendWhenReadytoComplete flag on one of the move requests to $false, then resume only that move request.

The reason for setting SuspendWhenReadytoComplete to $false is to ensure that the move request does not auto-suspend again when you actually want it to complete.

[PS] C:\>Get-MoveRequest "Alannah Shaw" | Set-MoveRequest -SuspendWhenReadyToComplete:$false
[PS] C:\>Get-MoveRequest "Alannah Shaw" | Resume-MoveRequest
[PS] C:\>Get-MoveRequest
DisplayName                                    Status                    TargetDatabase
-----------                                    ------                    --------------
Alannah Shaw                                   InProgress                DB03
Alison Pugh                                    AutoSuspended             DB03
Annette O'sullivan                             AutoSuspended             DB03
Chrissie Varney                                AutoSuspended             DB03
Carol Okyere                                   AutoSuspended             DB01

That move request will complete, while the others remain suspended.

[PS] C:\>Get-MoveRequest
DisplayName                                    Status                    TargetDatabase
-----------                                    ------                    --------------
Alison Pugh                                    AutoSuspended             DB03
Annette O'sullivan                             AutoSuspended             DB03
Chrissie Varney                                AutoSuspended             DB03
Carol Okyere                                   AutoSuspended             DB01
Alannah Shaw                                   Completed                 DB03

That can be repeated as many times as necessary to get the desired result. Or I can simply complete the entire migration batch.

[PS] C:\>Get-MigrationBatch "Migration Batch 10" | Complete-MigrationBatch
Confirm
Are you sure you want to perform this action?
Complete migration batch "Migration Batch 10"?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): y

The remaining move requests will then complete as expected.

[PS] C:\>Get-MoveRequest
DisplayName                                    Status                    TargetDatabase
-----------                                    ------                    --------------
Alison Pugh                                    Completed                 DB03
Annette O'sullivan                             Completed                 DB03
Alannah Shaw                                   Completed                 DB03
Chrissie Varney                                Completed                 DB03
Carol Okyere                                   Completed                 DB01
[PS] C:\>Get-MigrationBatch "Migration Batch 10"
Identity                        Status                    Type                           TotalCount
--------                        ------                    ----                           ----------
Migration Batch 10              Completed                 ExchangeLocalMove              5

This article Completing Individual Move Requests from a Migration Batch is © 2014 ExchangeServerPro.com

Get more Exchange Server tips at ExchangeServerPro.com

     

Viewing all articles
Browse latest Browse all 515

Trending Articles