Mailbox Move CMDlets

Get a count of all mailboxes in database (per DB)
Get-mailboxdatabase -identity EX10mbx11 | Get-Mailbox -resultsize unlimited | Group-Object -Property:Database | FT name,count -AutoSize

Use this command to view how many move requests are in the queue to be moved:
(Get-MoveRequest -MoveStatus Queued).count

Find the number of Move requests that haven’t completed:
(Get-moverequest -resultsize unlimited | Get-moverequeststatistics| where {$_.Status -notlike “completed*”}).count

Get Good Mailbox Move information for Moves in Progress
Get-moverequest -MoveStatus InProgress | Get-moverequeststatistics| ft DisplayName,PercentComplete,TotalMailboxSize,Bytes* -AutoSize

Get Mailbox Move information by BATCH NUMBER
Get-moverequest -resultsize unlimited |get-moverequeststatistics |where ({$_.Batchname -like “acct” -and $_.Status -ne “completed”})| sort-object -Property Status -descending | ft Displayname, status, percentcomplete -AutoSize

Get Mailbox Move information by BATCH NUMBER and good information
Get-moverequest | Get-moverequeststatistics| ft DisplayName,batchname,PercentComplete,TotalMailboxSize,Bytestransferredperminute -AutoSize

Get Move Status by Database
Get-moverequest -resultsize unlimited | Get-moverequeststatistics| where {$_.SourceDatabase -like “EX10mbx08”} | Sort-Object -Property PercentComplete -Descending | ft DisplayName, batchname, SourceDatabase,PercentComplete,Status -AutoSize

Get Mailbox Moves that are NOT completed
Get-moverequest -resultsize unlimited | Get-moverequeststatistics| where {$_.Status -notlike “completed*”} | Sort-Object -Property PercentComplete -Descending | ft DisplayName, batchname, SourceDatabase,PercentComplete,Status -AutoSize

Get Mailbox Moves that are Completing
Get-moverequest -resultsize unlimited | Get-moverequeststatistics| where {$_.Status -eq “completing”} | Sort-Object -Property PercentComplete -Descending | ft DisplayName, batchname, SourceDatabase,PercentComplete,Status -AutoSize

Use these commands to get a snapshot of the move throughput for completed moves.
$stats = Get-MoveRequest -MoveStatus Completed | Get-MoveRequestStatistics
$stats | sort totalmailboxsize | ft Alias,{$_.totalmailboxsize.ToMB()},totalinprogressduration -auto

Get Mailbox Moves that are NOT completed by Database
Get-moverequest -resultsize unlimited | Get-moverequeststatistics| where {$_.SourceDatabase -like “EX10mbx02” -and $_.Status -ne “completed”} | Sort-Object -Property PercentComplete -Descending | ft DisplayName, batchname, SourceDatabase,PercentComplete,Status -AutoSize

Get Mailbox Moves by Source DB that are pending completion (Auto Completion)
Get-moverequest -resultsize unlimited | Get-moverequeststatistics| where {$_.SourceDatabase -like “EX10mbx03” -and $_.Status -eq “autosuspended”} | Sort-Object -Property PercentComplete -Descending | ft DisplayName,PercentComplete,TotalMailboxSize,Bytestransferredperminute ,status -AutoSize

Get Mailbox Moves by Batch that are pending completion (Auto Completion)
Get-moverequest -resultsize unlimited | Get-moverequeststatistics| where {$_.Batchname -like “batch1” -and $_.Status -eq “autosuspended”} | Sort-Object -Property PercentComplete -Descending | ft DisplayName, batchname, SourceDatabase,PercentComplete,Bytestransferredperminute, Status -AutoSize

Get Mailbox Moves that are Suspended
Get-moverequest -resultsize unlimited | Get-moverequeststatistics| where {$_.Status -eq “suspended”} | Sort-Object -Property PercentComplete -Descending | ft DisplayName, batchname, SourceDatabase,PercentComplete,Status -AutoSize

Get Suspended Moves and resume move requests
Get-MoveRequest -resultsize unlimited -MoveStatus Suspended | Resume-MoveRequest

Get Mailbox Moves that are NOT completed and resume them
Get-moverequest -resultsize unlimited | Get-moverequeststatistics| where {$_.Status -ne “completed”} | Resume-MoveRequest

Get Failed Moves and resume move requests
Get-MoveRequest -resultsize unlimited -MoveStatus Failed | Resume-MoveRequest

Get Autosuspended Moves and resume move requests
Get-MoveRequest -resultsize unlimited -MoveStatus Autosuspended | Resume-MoveRequest

Get Completed Moves and Remove move requests
Get-MoveRequest -resultsize unlimited -MoveStatus Completed | Remove-MoveRequest

Get Mailbox Moves that are NOT completed and remove requests
Get-moverequest -resultsize unlimited | Get-moverequeststatistics| where {$_.Status -notlike “completed*”} | Remove-MoveRequest

Remove completed moves by Batch
Get-moverequest -resultsize unlimited |get-moverequeststatistics |where ({$_.Batchname -like “batch1 to batch2” -and $_.Status -eq “completed”})| Remove-MoveRequest

Get-Mailbox Move Statistics with Great Details
Get-MoveRequest -resultsize unlimited| Get-MoveRequestStatistics |Sort-Object CompletionTimeStamp| ft DisplayName, @{Expression={$_.BadItemsEncountered};Label=”Errors”}, @{Expression={$_.PercentComplete};Label=”Percent”}, @{Expression={$_.TotalMailboxSize.ToString().Split(“(“)[0]};Label=”Size”}, @{Expression={$_.totalinprogressduration};label=”Time”},@{Expression={(($_.BytesTransferred/$_.TotalInProgressDuration.TotalMinutes)*60).ToString().Split(“(“)[0]};Label=”Pace/hr”}, @{Expression={$_.MRSServerName.ToString().Split(“.”)[0]};Label=”CAS”}, @{Expression={$_.SourceDatabase.ToString().Split(“”)[0]};Label=”SourceServer”},SourceDatabase,Status,CompletionTimestamp -auto

Get-Mailbox Move Statistics with Great Details and export
Get-MoveRequest -resultsize unlimited| Get-MoveRequestStatistics |Sort-Object status| ft DisplayName, @{Expression={$_.BadItemsEncountered};Label=”Errors”}, @{Expression={$_.PercentComplete};Label=”Percent”}, @{Expression={$_.TotalMailboxSize.ToString().Split(“(“)[0]};Label=”Size”}, @{Expression={$_.totalinprogressduration};label=”Time”},@{Expression={(($_.BytesTransferred/$_.TotalInProgressDuration.TotalMinutes)*60).ToString().Split(“(“)[0]};Label=”Pace/hr”}, @{Expression={$_.MRSServerName.ToString().Split(“.”)[0]};Label=”CAS”}, @{Expression={$_.SourceDatabase.ToString().Split(“”)[0]};Label=”SourceServer”},SourceDatabase,Status,CompletionTimestamp -auto > c:dame.txt

Cancel Move Request for one user
Get-moverequest -Identity ‘user’ | Remove-MoveRequest

Get Move request ERROR status for Failed jobs
Get-moverequest -resultsize unlimited |get-moverequeststatistics |where ({$_.Batchname -like “batch” -and $_.Status -eq “failed”})| sort-object -Property Status -descending | fl DisplayName,batchname,sourcedatabase,targetdatabase,overallduration,mrsservername,totalmailboxsize,totalmailboxitemcount,percentcomplete,failurecode,failuretype,message,failuretimestamp

Get Move request ERROR status for Failed jobs
Get-moverequest -resultsize unlimited |get-moverequeststatistics |where {$_.Status -eq “failed”}| sort-object -Property Status -descending | fl DisplayName,batchname,sourcedatabase,targetdatabase,overallduration,mrsservername,totalmailboxsize,totalmailboxitemcount,percentcomplete,failurecode,failuretype,message,failuretimestamp

Get move details for ongoing moves
Get-moverequest -resultsize unlimited |get-moverequeststatistics |where ({$_.Batchname -like “batch” -and $_.Status -ne “completed”})| sort-object -Property Status -descending | ft DisplayName,batchname,status,targetdatabase,overallduration,mrsservername,percentcomplete -autosize

Find number of moves that haven’t completed
(Get-moverequest -resultsize unlimited |get-moverequeststatistics |where {$_.Batchname -like “batch” -and $_.Status -ne “completed”}).count| ft -autosize

Create a local move request
New-MoveRequest -Identity ‘user@domain.com’ -TargetDatabase DB01

Create a move request that suspends before completion
New-MoveRequest -Identity ‘user@domain.com’ -TargetDatabase DB01 -SuspendWhenReadyToComplete

Remove Clear completed move requests
Get-MoveRequest -resultsize unlimited -MoveStatus queued | Remove-MoveRequest

Resume Failed Requests
Get-MoveRequest -resultsize unlimited -MoveStatus Failed | Resume-MoveRequest

Create a move request processed by a specific server
New-MoveRequest -Identity ‘user@domain.com’ -TargetDatabase DB01 -MRSServer exchsrv1.domain.com

Move a user’s primary mailbox and allow a large bad item limit
New-MoveRequest -Identity ‘user@domain.com’ -TargetDatabase EX10MBX28 -BadItemLimit 100 -AcceptLargeDataLoss

Please feel free to share.

Related News

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyrıght 2013 FUEL THEMES. All RIGHTS RESERVED.

Enjoy this blog? Please spread the word :)