How to Use Stop-MigrationBatch Cmdlet?

                         How to Use Stop-MigrationBatch Cmdlet?

Summary: When running a migration batch, sometimes you encounter issues that can impact the migration process. In such a case, you need to stop the migration batch and then create new batches. To stop a migration batch in Exchange Server, there is a PowerShell cmdlet - Stop-MigrationBatch. In this post, we will discuss how to use the Stop-MigrationBatch cmdlet, along with different parameters. We will also mention an EDB converter tool that can help migrate all the Exchange Server data without any issues.


The Stop-MigrationBatch cmdlet in Exchange Server is used to stop migration batch of mailboxes that are in progress. This means you can stop the migration batches which are in the “processing” status or still to be migrated. When you stop a migration batch, it will affect only the mailboxes which are yet to be migrated. The mailboxes which were processed from the batch will not be modified. It is to be noted that you cannot revert or stop the migration batches which were failed or completed.

How to Use Stop-MigrationBatch Cmdlet?

To run the command, you need to first ensure that you have the right permissions and roles assigned. To check the required roles and permissions, open the Exchange Management Shell (EMS) and run the following command.

You can run the below command to know the Role Assignment you need to execute the Stop-MigrationBatch cmdlet.

After assigning the above permissions and roles, you can go ahead and run the Stop-MigrationBatch cmdlet. You can execute the cmdlet from either the source of the migration or another Exchange Server, if you are running a Database Availability Group (DAG).

Execute the Stop-MigrationBatch Cmdlet

Before stopping a migration batch, you need to know the identity of the migration batch. You can get this information by using the below command.

This will list all the migration batches that have been completed, pending, or running. Once you have the identity of the migration batch you need to stop, run the command as given below.

Once you run the command, you will receive a prompt for confirmation. If you want to skip this part, you can add the Confirm parameter in the cmdlet (see the below example).

If you want to specify the Active Directory server, you can use the DomainController parameter, along with the name of the server (see the below example).

If, before running the command, you want to test the outcome of your script, you can add the WhatIf parameter at the end of the command (see the below example).

An Alternative Solution for Data Migration

Though you can use migration batches and other scripts to migrate data, the process is lengthy, time consuming, and involves the risk of committing errors. Also, the Exchange Server must be running with no issues.

As an alternative, you can use an EDB to PST converter software, such as Raminfotech Converter for EDB for migration of all the EDB data, including user mailboxes, shared mailboxes, disabled mailboxes, user archives and public folders, without any issues. With this application, you can easily open multiple EDB files with or without an Exchange Server.

You can granularly select the data and export directly to a live Exchange Server or Exchange Online (Office 365). It has the automatic mailbox matching feature that matches the source mailboxes to the destination.


You can also save the EDB data in PST and various other formats. Raminfotech Converter for EDB can make migrations easier. It ensures data integrity and is compatible with every Exchange Server version.

Conclusion

Above, we have discussed how to use the Stop-MigrationBatch command in the Exchange Management Shell (EMS) to stop a migration batch during processing. You can only stop the migration of batches, having mailboxes which are in the processing stage or are still waiting to be migrated. Alternatively, you can use applications, like Raminfotech Converter for EDB that can make the migration process easier and quick.

 

 

 

 

Post a Comment

0 Comments