Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

Remote mailbox move fails with "You must specify the PrimaryOnly parameter"

$
0
0

You have a situation where you are performing remote mailbox move from your on-premises exchange server to Office 365 Exchange Online and  you come across this error "You must specify the PrimaryOnly parameter"

This situation occurs due to  below reasons:

1. You have your users' Primary mailbox on the On-premises exchange server and Archive is on cloud in the Hybrid setup.

2. Now you decided to move this users' Primary mailbox to cloud so that both his Primary mailbox and In-Place Archive are in cloud

3. You initiate remote mailbox move from Office 365 EAC and you choose this user for the move; Now you get error as 'You must specify the PrimaryOnly parameter'

This is because in GUI we do not have option to select only primary mailbox though we have only archive mailbox! See below:

How to get around this situation? Its easy, we will use PowerShell!

Connect to Exchange Online using below cmdlets. Run one after the other in the Windows PowerShell.

$UserCredential = Get-Credential (This will ask user name and password - Use Office 365 Global admin user name and password)

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

Now that we are connected to Office 365 Exchange Online using PowerShell, we are all set to run the cmdlet that will help resolve the issue for us.

New-MoveRequest -Identity <user email address to move> -Remote -RemoteHostName 'your on-premises mrxproxy url' -RemoteCredential (Get-Credential) -BatchName <name of the batch> -PrimaryOnly -TargetDeliveryDomain <Office 365 mail.onmicrosoft.com domain>

Note: This will ask for 'Credential" ; Use your on-premises Exchange Admin Credential.

And we are done. The move request should be created and you can check the status of this request using below cmdlet:

Get-MoveRequestStatistics -Identity <the batch name>

Thanks and Happy Learning!


Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>