How to Remove an Exchange Management Role Assignment in Exchange Server
Question details
The user needs to remove a management role assignment for a former administrator in an Exchange Server environment.

- Product
- Exchange Server
- Device & OS
- not provided
- Scenario
- Managing administrator roles and cleaning up permissions for a departed employee in an on-premises Exchange DAG environment.
- Observed behavior
- The user was attempting to use PowerShell commands but needed clarification on using the correct environment tools (Exchange Online vs. on-premises Exchange Server) to execute the removal successfully.
Verify whether your environment is Exchange Online or an on-premises Exchange Server (DAG), as the management tools and PowerShell modules differ significantly between the two setups.
Use Exchange Management Shell for On-Premises Servers
Execute the Remove-ManagementRoleAssignment command within the local Exchange Management Shell for on-premises server environments.
Because your environment is an on-premises Exchange Server configured in a DAG (Database Availability Group), you must use the local Exchange Management Shell rather than Exchange Online PowerShell modules.
Log in to your on-premises Exchange Server and launch the Exchange Management Shell application from the Start menu.
Type the command `Remove-ManagementRoleAssignment "[Role Assignment Name]"` (for example, `Remove-ManagementRoleAssignment "Mailbox Import Export-Robert J. Newton-1"`) and press Enter.
When PowerShell prompts you to confirm the action, type 'Y' and press Enter to finalize the removal of the management role.

Document Your IT Policies Seamlessly with WPS Office
While WPS Office does not manage Microsoft Exchange servers directly, it provides a comprehensive, lightweight, and free alternative to Microsoft Office. It is highly recommended for documenting IT policies, writing PowerShell script drafts, and keeping track of administrative changes.

Frequently Asked Questions
Why does my Remove-ManagementRoleAssignment command fail?
This usually happens when using the wrong PowerShell environment. Exchange Online commands may not execute successfully if you are managing an on-premises Exchange Server environment. Ensure you are using the local Exchange Management Shell.
How can I find the exact name of an Exchange management role assignment?
You can find the exact name by running the `Get-ManagementRoleAssignment` cmdlet in your Exchange Management Shell. This will list all active assignments so you can copy the correct string for removal.
Can I use Exchange Online PowerShell to manage my on-premises DAG?
No. Exchange Online PowerShell modules are designed for cloud environments. For an on-premises Exchange Server Database Availability Group (DAG), you must use the specific on-premises Exchange Server tools provided by Microsoft.




