I was noticing similar behavior in our environment and wanted to share what we found. I was attempting to use the same script to move a Shared mailbox from OnPremise to ExO M365. I enabled Exchange tracing in Adaxes. Running Adaxes 2023.2 version 3.16.21906.0 as well.
[01/10/2024 10:28:48] New-MoveRequest -Identity "3478596c-bb45-484f-9a47-e341dd6c88f8" -Remote "True" -RemoteHostName "XXXX.XXXX.com" -TargetDeliveryDomain "XXXXX.mail.onmicrosoft.com"
[01/10/2024 10:28:59] System.Management.Automation.ParameterBindingException: Parameter set cannot be resolved using the specified named parameters.
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection1 input, PSDataCollection
1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1 input, PSDataCollection
1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at #Dh.#Jh.#l.#5w.#VZc(RunspacePool runspacePool, PSCommand psCommand, String[]& warnings)
at #Dh.#Jh.#l.#5w.Execute(#Gh command)
at #Dh.#Fsf.Execute(#Gh command)
at #ik.#hXe.Execute(#Gh command)
When I ran the new-moverequest command by itself on our on-premise Exchange 2016 server the error became more clear.
[PS] C:\Windows\system32>New-MoveRequest -Identity "3478596c-bb45-484f-9a47-e341dd6c88f8" -Remote "True" -RemoteHostName "XXXX.XXXX.com" -TargetDeliveryDomain "XXXX.mail.onmicrosoft.com"
A positional parameter cannot be found that accepts argument 'True'.
- CategoryInfo : InvalidArgument: (:) [New-MoveRequest], ParameterBindingException
- FullyQualifiedErrorId : PositionalParameterNotFound,New-MoveRequest
- PSComputerName : XXXX-exch04.XXXX.com
So it appears the -Remote "true" is the extra positional parameter it did not like. If you remove "true" and just leave -Remote you get positive results, and the command gets farther.
I am still having issues on my end with the move requests because the GUID is not being found, and if i change it to the shared mailbox samAccountname it gets farther but then fails with
Target user 'sharedMailboxName' already has a primary mailbox.
That part may be entirely on my end. But I think the Remote part is what is causing the issue I saw and CurtisA saw as well.