How to complete a migration batch with PowerShell in Exchange Online manually? You created new…
You must specify the ArchiveDomain parameter
You like to migrate primary mailboxes only without moving archive mailbox from Exchange Online in Microsoft 365 to Exchange On-Premises. The following error message appears: ParameterValueRequiredPermanentException: You must specify the ArchiveDomain parameter. What is the solution for the failed message?
Table of contents
Move primary mailbox only from Exchange Online
Sign in to on-premises Exchange admin center and go to the user mailbox you want to migrate from Exchange Online to Exchange On-Premises.
Our example is the user mailbox Sarah Coleman and the mailbox is hosted in Office 365.
Click on View details under In-Place Archive in the right pane to open the options.
The archive mailbox is in the cloud because it shows Cloud-based archive created.
Sign in to Microsoft 365 Exchange Admin Center. Create a new migration batch from Exchange Online to Exchange On-Premises. Go through the wizard until you see the below screen.
We did select Move primary mailbox only, without moving archive mailbox.
Finish the new migration batch, and it will start to sync until you get the below error.
Error: You must specify the ArchiveDomain parameter
Click the mailbox that shows the status Failed. Then, you will see the failed error message in the details pane.
Error: ParameterValueRequiredPermanentException: You must specify the ArchiveDomain parameter.
Why is that happening, and what is the solution for Error: ParameterValueRequiredPermanentException: You must specify the ArchiveDomain parameter.
Solution for you must specify the ArchiveDomain parameter
Why are mailboxes showing the error message: Error: ParameterValueRequiredPermanentException: You must specify the ArchiveDomain parameter.
That’s because the mailbox has a cloud-based archive, and you only want to migrate the primary mailbox and not the cloud-based archive. To do that, you need to specify a couple of parameters, and this is NOT POSSIBLE in Exchange admin center.
The solution is to use PowerShell to migrate the primary mailbox only, without moving archive mailbox, and keep the cloud-based archive in Microsoft 365/Office 365.
Step 1. Delete failed mailbox migration
Select the failed mailbox move and click on the Delete icon.
Step 2. Connect to Exchange Online PowerShell
Run Windows PowerShell as administrator and connect to Exchange Online PowerShell.
PS C:\> Connect-ExchangeOnline
Step 3. Get remote hostname
Run the Get-MigrationEndpoint cmdlet to get the remote server URL. Read more about how to find RemoteHostName URL for mailbox migration. The Hybrid Configuration Wizard created this migration endpoint.
Copy the RemoteServer URL value as you need it in the next part.
PS C:\> Get-MigrationEndpoint | Format-List Identity, RemoteServer
Identity : Hybrid Migration Endpoint - EWS (Default Web Site)
RemoteServer : mail.exoip.com
Step 4. Get archive domain
Run the Get-Mailbox cmdlet to get the archive domain. Copy only the domain name without @ symbol, as you will need it in the next part.
Note: The archive domain is the Exchange Online organization SMTP domain and always ends with mail.onmicrosoft.com.
In our example, it’s exoip365.mail.onmicrosoft.com.
PS C:\> Get-Mailbox -Identity "Sarah.Coleman@exoip.com" | Select-Object DisplayName,PrimarySmtpAddress, @{Name="EmailAddresses";Expression={($_.EmailAddresses | Where-Object {$_ -clike "smtp:*mail*"} | ForEach-Object {$_ -replace "smtp:",""}) -join ","}} | Sort-Object DisplayName
DisplayName PrimarySmtpAddress EmailAddresses
----------- ------------------ --------------
Sarah Coleman Sarah.Coleman@exoip.com Sarah.Coleman@exoip365.mail.onmicrosoft.com
Step 5. Move primary mailbox only to on-premises with PowerShell
Create a new move request to move the primary mailbox only and keep the archive mailbox in the cloud. Fill in the following details:
- -Identity: Mailbox name or email address
- -OutBound: Keep value empty
- -RemoteTargetDatabase: Exchange on-premises mailbox database
- -RemoteHostName: The remote server that you copied in the previous step
- -PrimaryOnly: Keep value empty
- -ArchiveDomain: Primary SMTP domain used for the Exchange Online organization mailboxes that you copied in the previous step
- -TargetDeliveryDomain: Primary SMTP domain used for the Exchange Online organization mailboxes
- -RemoteCredential: On-premises administrator account with privileges
PS C:\> Get-Mailbox -Identity "Sarah.Coleman@exoip.com" | New-MoveRequest -OutBound -RemoteTargetDatabase "DB01" -RemoteHostName "mail.exoip.com" -PrimaryOnly -ArchiveDomain "exoip365.mail.onmicrosoft.com" -TargetDeliveryDomain "exoip.com" -RemoteCredential (Get-Credential exoip\administrator)
Read more: Move mailbox from Exchange Online to on-premises »
Step 6. Verify mailbox move completion
Check the mailbox move and verify that it completes successfully.
PS C:\> Get-MoveRequest -Identity "Sarah.Coleman@exoip.com" | Get-MoveRequestStatistics
DisplayName StatusDetail TotalMailboxSize TotalArchiveSize PercentComplete
----------- ------------ ---------------- ---------------- ---------------
Sarah Coleman Completed 3.057 MB (3,205,207 bytes) 0 B (0 bytes) 100
In on-premises Exchange admin center, it shows the mailbox type as User. The mailbox is on-premises and not in Microsoft 365/Office 365.
The archive status will show the status Cloud-based archive created.
You successfully did migrate the primary mailbox to Exchange On-Premises and kept the archive mailbox in the cloud.
Keep reading: Determine if a mailbox is on-premises or in Office 365 »
Conclusion
You learned why the error you must specify the ArchiveDomain parameter shows up. You want to move the primary mailbox to Exchange On-Premises and keep the archive mailbox in Exchange Online. Unfortunately, this is not possible with Exchange admin center. The solution is to move the primary mailbox only with Exchange Online PowerShell.
Did you enjoy this article? You may also like Exchange attributes after Exchange Server uninstall. Don’t forget to follow us and share this article.
This Post Has 0 Comments