Share via


Remove a Role

 

Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Management roles that are no longer required can be removed from your organization. You can only remove management roles that you created. Built-in management roles can't be removed. For more information about management roles in Microsoft Exchange Server 2010, see Understanding Management Roles.

You must use the Shell to remove management roles.

Looking for other management tasks related to roles? Check out Managing Advanced Permissions.

Prerequisites

Before you can remove a management role, you must remove all its management role assignments. For more information about how to remove a role assignment, see Remove a Role from a User or USG.

What Do You Want to Do?

  • Use the Shell to remove a management role with no child roles

  • Use the Shell to remove a management role with child roles

  • Use the Shell to remove an unscoped management role

    Note

    You can't use the EMC to remove a management role.

Remove a management role with no child roles

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Management roles" entry in the Role Management Permissions topic.

To remove a role with no child roles, use the following syntax.

Remove-ManagementRole <role name>

This example removes the Seattle Server Administrators role.

Remove-ManagementRole "Seattle Server Administrators"

For detailed syntax and parameter information, see Remove-ManagementRole.

Remove a management role with child roles

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Management roles" entry in the Role Management Permissions topic.

If a role that you want to remove has child roles, you must remove all the child roles also. You receive an error message if you try to remove a role that has child roles unless you use the Recurse switch. If you use the Recurse switch when you remove a role, the role you specify and all its child roles are removed.

Warning

If you use the Recurse switch, all child roles of the specified role you want to remove are also removed. Make sure that you're aware of what roles will be removed before you run this command.

To make sure that you remove only the roles that you want to remove, use the WhatIf switch with your command to verify that it's correct. Use the following syntax.

Remove-ManagementRole <role name> -Recurse -WhatIf

The WhatIf switch performs the command without committing any changes and reports which roles it would have removed. For more information about the WhatIf switch, see WhatIf, Confirm, and ValidateOnly Switches.

After you confirm that only the roles you want to remove will be removed, run the same command without the WhatIf switch. This example removes the London Administrators role and all its child roles.

Remove-ManagementRole "London Administrators" -Recurse

For detailed syntax and parameter information, see Remove-ManagementRole.

Remove an unscoped management role

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Unscoped management roles" entry in the Role Management Permissions topic.

To remove an unscoped role, the same procedures provided in Remove a management role with no child roles and Remove a management role with child roles earlier in this topic can be used. The only difference is that when you remove an unscoped role, you must specify the UnScopedTopLevel switch when you run the command. This example removes an unscoped role and all its child roles.

Remove-ManagementRole "Custom IT Scripts" -Recurse -UnScopedTopLevel

As with removing other roles, you should use the WhatIf switch to verify that you're removing the correct roles.

For detailed syntax and parameter information, see Remove-ManagementRole.

 © 2010 Microsoft Corporation. All rights reserved.