Forum Discussion
New-MigrationBatch strange behavior of parameters
I encounter a strange issue when trying to use New-MigrationBatch command with -StartAfter parameter. It does not auto fill it when typing 'st' + TAB and gives "Parameter cannot be found" if I write it explicitly. I am a member of Organization Management group. However, helpdesk technician can use this parameter!!! Tried connecting to the same or different Exchange server with RDP + EMS or through pssession - for him it works, for me - it doesn't. I tried to create a new admin role, assign it all roles there are and assigning it to the new user - same result as me.
When me and the other tech run (Get-Command New-MigrationBatch).Definition - I don't get the -StartAfter parameter, but he does!
Everything else works fine, from what I tried. The New-MigrationBatch is also working for me without -StartAfter parameter, but I need it for script. Couldn't find anything useful on the Internet, any ideas?
Running Exchange 2016 CU23
- I found the "problem"...
For some mysterious reasons, this parameter does not work if a user running it has a mailbox...
I don't know why MS configured it like this and why they haven't mentioned it on learn.microsoft.com
5 Replies
You can use the Get-ManagementRoleEntry cmdlet to retrieve management role entries that have been configured on management roles.
The following PowerShell will list the cmdlets and roles that have the parameter StartAfter:
Get-ManagementRoleEntry -Identity '*\*' -Parameters StartAfter | ft Name, Role- Iriy777Brass Contributor[PS] C:\Temp>Get-ManagementRoleEntry -Identity '*\*' -Parameters StartAfter | ft Name, Role
Name Role
---- ----
New-MailboxRelocationRequest Move Mailboxes
Set-MoveRequest Move Mailboxes
New-MoveRequest Move Mailboxes
New-MigrationBatch Migration
Set-MigrationBatch Migration
Both users has roles Migration and Move Mailboxes. New user I tried too. I also tried to take my user out of the group, wait a few hours and add back - same resultMy next suggestion would have been to check/confirm role assignments associated with the Migration management role by using the Get-ManagementRoleAssignment cmdlet:
Get-ManagementRoleAssignment -Role 'Migration' | ft Role, RoleAssigneeNameThen using the results from the above to confirm the members of the returned management role groups by using the Get-RoleGroupMember cmdlet:
Get-RoleGroupMember -Identity 'Organization Management'Although it appears you've already done similar
Where are you running the cmdlets from, the Exchange server?