The maximum number of migration batches is already running

Reading Time: < 1 minute

When migrating mailboxes from Exchange Hybrid to Exchange Online (O365), you may receive the below error when attempting to migrate a new batch

The maximum number of migration batches is already running. Please remove a batch before you add another one.

The limit of the number of migration batches you can create is 100. The main purpose of why Microsoft set this limit is for performance reasons. Having more than 100 batches causes performance problems and could cause outages for other customers in the multi tenant system. You can check the limit by typing the below command within Exchange Online Powershell

Get-MigrationConfig |FL *max*

This error is common when migrating mailboxes from Exchange to O365 (Exchange Online) and users find that when they receive this error there are no other migration batches in progress.

This 100 batch number limit also includes batches which have already been completed. To get around this, remove a completed batch and start your new batch migration again. You’ll find that it works.

Please do comment below to let us know how you get on


‘Cannot start service MSExchangeServiceHost on computer’ when upgrading Exchange CU

Reading Time: < 1 minute

Issue:
When attempting to upgrade to a later version of Exchange Cumulative Update (CU) you receive the below error.

Cannot start service MSExchangeServiceHost on computer

You find that a number of Exchange services are automatically set to disabled as part of the update process but don’t reset to automatic, therefore, causing the above message to trigger. From the research I carried out, this issue has been experienced by users performing an update on different versions of Exchange and there doesn’t seem to be a permanent resolution at the time of writing this post. For some reason the process does not set the services back to automatic.

It’s impossible to start the Exchange Services manually as there are a few services that need to be set manually from disable to automatic and at the right time. Running the below script can help but you need to be constantly keeping an eye on when the services are disabled and the script needs to be triggered at the right time before the wizard passes to the next stage. A number of people failed at running the script below.

Get-Service *Exchange* | Set-Service -StartupType Automatic

I located a useful script posted on the Microsoft Blog within the comments section by a user named wandersick.

Note: ensure you have a backout plan in the event you need to roll back.

Here is the fix:

  1. Back up the original service startup types (Automatic/Manual/Disabled)
  2. Create a loop script to keep enabling the services during the CU upgrade. The script is:

while (1 -le 2) { sleep 1 ; Get-Service | where{$_.DisplayName -Like ‘Microsoft Exchange*’} | Set-Service –StartupType ‘Automatic’ }

3. After the upgrade, service startup types were manually restored from Automatic to their original settings

Thanks to wandersick for providing this solution

Remove Mailbox Import or Export requests

Reading Time: < 1 minuteRemove Completed Import Requests
Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest

Remove Failed Import Requests
Get-MailboxImportRequest -Status Failed | Remove-MailboxImportRequest

Remove Completed Export Request
Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest

Remove Failed Export Request
Get-MailboxExportRequest -Status Failed | Remove-MailboxExportRequest