Create Mailbox import export role

Assign Mailbox Import Export role to user, security group and existing role group

Run the following command to assign the role for the individual user account.

New-ManagementRoleAssignment –Role "Mailbox Import Export" –User "user name"

Run the following command to set this role for the universal security group.

New-ManagementRoleAssignment –Role "Mailbox Import Export" –SecurityGroup "group name"

Use the below command to add this role to existing management role group.

New-ManagementRoleAssignment -Role "Mailbox Import Export" -SecurityGroup "Organization Management" -Name "Import Export Org Management"

Find who has access to Mailbox Import Export role

You can run the following command to find out who has the role already.

Get-ManagementRoleAssignment –Role "Mailbox Import Export" | FL RoleAssigneeName, Name

In the result, you may see the Organization Management role group even though you haven’t explicitly given the rights , this is because of the members of the Organization Management role group can delegate the “Mailbox Import Export” role to themselves and other groups or users.

Remove Management Role Assignment

If you want to remove the existing role assignment, first you have to find the name of the role assignment that you want to delete using the command Get-ManagementRoleAssignment and run the following powershell command to clear the existing role.

Remove-ManagementRoleAssignment "Import Export Org Management" -Confirm:$false

Source

Leave a Reply