Skip to content
www.mytechnote.ru
Menu
  • Administration
    • Scripts
  • Equipment
    • Reviews
    • Instructions
  • Other
  • English
    • English
    • Русский
Menu

How to Manage Roles in Exchange: Useful Commands and Instructions

Sometimes, it’s necessary to modify roles in Exchange—for instance, to add or remove the ability to execute certain cmdlets for specific user groups. This article provides examples of commonly used commands that can serve as a handy reference, saving you the trouble of navigating through various sections of Microsoft’s documentation.

Retrieving All Management Roles with Permission for a Cmdlet

To find out which roles are allowed to execute a specific cmdlet, use the following command:

Get-ManagementRole -Cmdlet "clear-mailbox"

Removing a Cmdlet from a Role’s Permissions

If you need to remove a particular cmdlet from a role’s permissions, run this command:

Remove-ManagementRoleEntry "Role Name\Clear-MobileDevice"

Viewing Allowed Cmdlets for a Role

To see the list of all cmdlets permitted for a specific role, use the following:

Get-ManagementRoleEntry "Role Name\Clear-*"

Displaying All Roles Associated with a Management Role

To identify which roles are linked to a specific Management Role, execute:

Get-ManagementRoleAssignment -Role "Role Name" | Select-Object RoleAssigneeName

Copying a Management Role

To create a copy of an existing role, use this command:

New-ManagementRole -Name "Mail Recipients Copy" -Parent "Mail Recipients"

Example: Granting Cmdlet Execution Permissions to a User Group

Suppose you need to allow the execution of the Get-ServerComponentState cmdlet for the “region support” group. Here’s a step-by-step example:

Create a new role inherited from an existing one:

New-ManagementRole -Name "ServerComponentState Support" -Parent "Send Connectors"

Remove all commands from the new role except Get-ServerComponentState:

Get-ManagementRoleEntry "ServerComponentState Support\*" | Where-Object {$_.Name -notlike "*Get-ServerComponentState*"} | Remove-ManagementRoleEntry

Assign this role to the security group:

New-ManagementRoleAssignment -Role "ServerComponentState Support" -SecurityGroup "region support"

Conclusion

Managing roles in Exchange provides flexible ways to configure cmdlet access for different user groups. Use these commands for effective role management and permissions configuration. If you have additional questions or need further information, refer to Microsoft’s official documentation.

Posted on 25.12.202425.12.2024 by sanglyb

Post navigation

← How to Find Emails in Exchange by Keyword in All Mailboxes
Analyzing SMTP Logs in Microsoft Exchange with PowerShell →

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Подписывайтесь

Youtube
vk
telegram
github
twitter
rss
  • Форум
  • Об авторе
  • Поддержать автора

Популярные записи

Новые записи

  • How to Extend an LVM Partition in Linux
  • SCCM Reporting Errors After Migrating from SQL Server 2016 to 2019
  • Problem Using PassFiltEx on Older CPUs
  • How to remove attachments from old calendar events in Exchange using a script
  • How to download and install Office 2024 LTSC

Архивы

  • 2026 (3)
  • 2025 (5)
  • 2024 (7)
  • 2023 (30)
  • 2022 (4)
  • 2020 (17)
  • 2017 (82)
  • 2016 (5)
© 2015-2026 www.mytechnote.ru
Использование материалов сайта возможно только с разрешения владельца или обязательна индексируемая, прямая, передающая вес ссылка на материал.