File Conversion

How to use New-MoveRequest Cmdlet

Summary:The New-MoveRequest PowerShell cmdlet is used to move or migrate mailboxes from one Exchange database to another in the same forest. It is also used in Exchange Online (Microsoft 365) to move mailboxes to or from Exchange Online. In this article, we have discussed how to use the New-MoveRequest cmdlet with various parameters to create migration batches. We’ve also discussed an EDB to PST converter software that can quickly move single or multiple users’ mailboxes from Exchange databases to a live Exchange Server or Exchange Online (Microsoft 365).

Free Download For Windows
Free Download For Windows

Moving or migrating mailboxes from one Exchange Server to another is a fairly common task that administrators need to perform often. In on-premises Exchange Server 2010 SP1 and later versions, administrators can use theNew-MoveRequestPowerShell cmdlet to create local move requests for moving user mailboxes, archives, and other mailboxes from one database to another within the same organization. The cmdlet can also be used formoving mailboxes from on-premises Exchange organization to Exchange Onlineor Microsoft 365 and vice-versa.

In this article, you will learn how to use theNew-MoveRequestcmdlet to perform mailbox moves or migrate mailboxes between on-premises Exchange databases or to and from Exchange Online (Office 365).

Before You Begin

你必须知道以下之前使用New-MoveRequestcmdlet in on-premises Exchange and Exchange Online.

  • You must have the Move Mailboxes role assigned to use theNew-MoveRequest
  • You can use the cmdlet to move mailboxes within an on-premises Exchange organization in the same Active Directory forest.
  • 你不应该使用mailboxe cmdlet移动s within an Exchange Online organization.
  • You can use the cmdlet to move single or multiple mailboxes at once.
  • You must use a CSV file to migrate multiple mailboxes to the destination database within the same forest or Exchange Online.
  • The cmdlet works in Exchange Server 2010 SP1, Exchange Server 2013, Exchange Server 2016, and Exchange Server 2019.

Using New-MoveRequest Cmdlet in Exchange Server

Here’s how you can use the New-MoveRequest cmdlet to move mailboxes in the same forest and to or from Exchange Online.

Assign the Required Roles and Permissions

OpenExchange Management Shell(EMS) and run the following commands to display the required roles and permissions for running the cmdlet.

$Perms = Get-ManagementRole -Cmdlet New-MoveRequest
$Perms | foreach {Get-ManagementRoleAssignment -Role $_.Name -Delegating $false | Format-Table -Auto Role,RoleAssigneeType,RoleAssigneeName}

assign the required role to the user for running new moverequest cmdlet

Then use theNew-ManagementRoleAssignmentcmdlet or Exchange Admin Center (EAC) to assign the required role to the user account that you will be using for moving the mailboxes.

New-ManagementRoleAssignment –Role "Move Mailboxes" –User

assign move mailboxes role to a user account in Exchange

Once the required roles and permissions are assigned, you can run and use theNew-MoveRequestto create a mailbox move request for moving or migrating user mailboxes or other mailboxes to another database or Exchange Online.

Move Mailboxes to Another Database in the Same Forest

Using the following New-MoveRequest PowerShell command, you can create a new mailbox move request by mentioning the source mailbox name (identity) and target mailbox database in the same forest.

New-MoveRequest -Identity
           -TargetDatabase
            -TargetMailboxDatabase
           
          

For instance,

New-MoveRequest -Identity 'ravi@test.local' -TargetDatabase "MBXDB03" –WhatIf

test the new moverequest cmdlet

By using the–WhatIfparameter, you can test the cmdlet before actually creating the move request. The parameter helps you verify the command action—if it’s valid and what it will do.

New-MoveRequest -Identity 'ravi@test.local' -TargetDatabase "MBXDB03"

create a mailbox move request using new moverequest cmdlet

This will move the mailbox ‘ravi’ (stored in theMBXDB01database) toMBXDB03.

To move multiple mailboxes at once, you can use the Get-Mailbox PowerShell cmdlet with the New-MoveRequest cmdlet. For instance,

Get-Mailbox -Database MBXDB01 | New-MoveRequest -TargetDatabase MBXDB03 -BatchName "MBXDB01toMBXDB03"

Move Mailboxes to Exchange Online (Microsoft 365)

To move the mailboxes from on-premises to Exchange Online, you need the following details:

  • -Identity:Mailbox name or email address.
  • -RemoteHostName:You can get this by using theGet-MigrationEndpoint
  • -TargetDeliveryDomain:The primary SMTP domain used in your organization for the Exchange Online mailboxes.
  • -RemoteCredential:Global administrator credentials or credentials of a user with the “Move Mailboxes” role assigned.

Follow these steps to move mailboxes from the on-premises mailbox database to Microsoft 365 or Exchange Online.

  • In the Exchange Management Shell, run the following command to change the execution policy.
    Set-ExecutionPolicy RemoteSigned
    PressYand hit Enter to confirm.
  • Install the Exchange Online Management module.
    Install-Module -Name ExchangeOnlineManagement
  • PressYandEnterkeys to proceed, if prompted.
  • Connect to the Exchange Online.
Connect-ExchangeOnline

connect to exchange online office 365

  • A new pop will appear. Enter the credentials to log in.

sign in to office 365 microsoft 365

  • Then run the following command to move the mailbox to Exchange Online (Microsoft 365).
New-MoveRequest -Identity "ravi@abc.com" -Remote -RemoteHostName "dh57faz6shw1-f2b3-4e51g.resource.mailboxmigration.his.msappproxy.net" -TargetDeliveryDomain "domain.mail.onmicrosoft.com" -TargetDeliveryDomain "domain.mail.onmicrosoft.com" -RemoteCredential (Get-Credential domain\administrator)

How to Check If Mailbox is Moved Successfully?

To check if the move request was successful and the mailbox is moved to the desired mailbox database, run the following command:

Get-MoveRequestStatistics –Identity ravi

check the move request status

It will show theStatusDetailandPercentComplete.

You may also use the Get-MoveRequest cmdlet to check the move status or progress.

Get-MoveRequest

To check the multiple mailboxes move request status, run the following command:

Get-MoveRequest –BatchName “MBXDB01toMBXDB03”

check batch migration or move request status

If you see the status as completed, it indicates that the mailbox has been successfully moved to the desired database or Exchange Online.

Conclusion

In this article, you have learned how to use theNew-MoveRequestPowerShell cmdlet to move or migrate the mailboxes from one database to another mailbox database in the same forest and to Exchange Online. In case there are issues or the command fails with an exception or error, you may refer to the Microsoft documentation for the solution. This may require administrative efforts and take some time to complete the migration. However, you can avoid the hassle by using an2022欧宝娱乐苹果下载 教育局,如恒星转换器。该软件can extract all mailboxes from an online or offline mailbox and save them to PST format, which you can import into Office 365. You may also directly export the mailboxes from an offline mailbox database on your on-premises Exchange Server to another database on the same or different server in the same forest. The software can also export single or multiple mailboxes from on-premises Exchange to Office 365 or Exchange Online (Microsoft 365) directly in a few clicks.

progress
81% of people found this article helpful

  • TUV SUD ISO 27001
  • TUV SUD ISO 9001
  • NIST
  • HIPAA Verified