Forum Discussion
Iriy777
Jul 11, 2023Brass Contributor
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 ...
- Jul 11, 2023I 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
kevkelly
Jul 11, 2023MCT
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
Iriy777
Jul 11, 2023Brass 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 result
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
- kevkellyJul 11, 2023MCT
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, 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?
- Iriy777Jul 11, 2023Brass Contributor[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- Iriy777Jul 11, 2023Brass ContributorI 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