Like I did here with Skype for Business, I’m collecting some observations and useful snippets about Exchange in hybrid environments.

Completing individual migration users

Recently we have been using the CompleteAfter flag in favour of the older SuspendWhenReadyToComplete to set a date for migration batches to complete. To update this timestamp for a single mailbox in a batch, we can use the following command:

Get-MoveRequest tom | Set-MoveRequest -CompleteAfter (Get-Date).AddHours(-1)

In the above example, the move request for the mailbox tom will be completed immediately without affecting other mailboxes in the batch.

Getting details about BadItems

Part of every migration are mailboxes with items that are either corrupt or cannot be imported to Exchange Online for some reason. Now if we don’t just increase the BadItemLimit counter but want more information about the corrupt items, we can get more information by using the -IncludeReport parameter with the Get-MigrationUser cmdlet:

$Stats = Get-MigrationUserStatistics -Identity [email protected] -IncludeReport 
$Stats.Report.BadItems

Recipient Permissions

The *RecipientPermission cmdlets are used to manage SendAs permissions in Exchange Online. A nice goody of the Get-RecipientPermission cmdlet is the option to find permissions by assignee, i.e. by user to whom the permissions are granted. To get all entries that grant permissions to the user tom we use the -Trustee parameter like this:

Get-RecipientPermission -Trustee tom

Likewise, we can find all permissions by access right using the -AccessRights parameter. The following example gets all entries that grant SendAs permissions:

Get-RecipientPermission -AccessRights SendAs

Shared Mailboxes

Starting with the June 2018 quarterly updates (2013 CU21 and 2016 CU10), the management of shared mailboxes in hybrid scenarios got easier. A -Shared parameter got added to the *RemoteMailbox cmdlets, instead creating a shared mailbox on-prem and then moving it to Exchange Online, we can now use New-RemoteMailbox -Name Office -Shared.

You have already updated to CU21/CU10 but the Shared parameter is not available? Run .\setup.exe /PrepareAD /IAcceptExchangeServerLicenseTerms

More Info: KB4133605

Tom