SOLVED

New-MigrationBatch strange behavior of parameters

Brass Contributor

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

5 Replies

@Iriy777 

 

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

 

 

[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 result

@Iriy777 

 

My 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, RoleAssigneeName

Then 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?

 

[PS] C:\Temp>Get-ManagementRoleAssignment -Role 'Migration' | ft Role, RoleAssigneeName

Role RoleAssigneeName
---- ----------------
Migration Organization Management
Migration Recipient Management
Migration Organization Management
Migration Account Management
Migration Admin-Test

Second command shows that I am the member of Organization Management

I am running it directly from Exchange server, though I tried a few times from my laptop through pssession to different servers
best response confirmed by Iriy777 (Brass Contributor)
Solution
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
1 best response

Accepted Solutions
best response confirmed by Iriy777 (Brass Contributor)
Solution
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

View solution in original post