Tuesday, March 19, 2024

Powershell: Clean (Remove) all completed Exchange Mailbox move requests

If you move a lot of users from one Server to another (or from one DB to another) you might wish to complete all such requests without typing the full name from the user.

The following PowerShell command could be used to clean (e.g. Remove) all completed Exchange mailbox move requests

Get-MoveRequest -movestatus completed | remove-moverequest

Some other useful Power Shell commands are:

Get all completed move requests:
Get-MoveRequest -resultsize unlimited | Where-Object {$_.status -like “Completed”} | Get-MoveRequestStatistics | select DisplayName, StatusDetail, *Size, *Percent* | ft

You can also do a small modification here to get only the non completed one via

Get-MoveRequest -resultsize unlimited | Where-Object {$_.status -notlike “Completed”} | Get-MoveRequestStatistics | select DisplayName, StatusDetail, *Size, *Percent* | ft

If you wish to get the failed one then you can use:

Get-MoveRequest -resultsize unlimited | Where-Object {$_.status -like “failed”} | Get-MoveRequestStatistics -IncludeReport | select DisplayName, Message, FailureType, FailureSide, FailureTimeStamp, *bad*, *large*, Report, Identity | fl

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

35FollowersFollow
- Advertisement -

Latest Articles