Commands › Exchange Online

Get-ManagementRole

Exchange Online ExchangeOnlineManagement Get-*

View management roles that have been created in your organization.

Quick start script

# Get-ManagementRole — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Get-ManagementRole -Identity <RoleIdParameter> -GetChildren <SwitchParameter> -Recurse <SwitchParameter> | Format-List

# 3. Export for evidence / drift tracking
Get-ManagementRole | Export-Clixml .\ManagementRole-$(Get-Date -Format yyyyMMdd).xml

Syntax — 4 parameter sets

GetChildren

Get-ManagementRole [-Identity] <RoleIdParameter>
 [-GetChildren]
 [-DomainController <Fqdn>]
 [-RoleType <RoleType>]
 [<CommonParameters>]

Recurse

Get-ManagementRole [-Identity] <RoleIdParameter>
 [-Recurse]
 [-DomainController <Fqdn>]
 [-RoleType <RoleType>]
 [<CommonParameters>]

Identity

Get-ManagementRole [[-Identity] <RoleIdParameter>]
 [-Cmdlet <String>]
 [-CmdletParameters <String[]>]
 [-DomainController <Fqdn>]
 [-RoleType <RoleType>]
 [<CommonParameters>]

Script

Get-ManagementRole [[-Identity] <RoleIdParameter>]
 [-Script <String>]
 [-ScriptParameters <String[]>]
 [-DomainController <Fqdn>]
 [-RoleType <RoleType>]
 [<CommonParameters>]

Parameters (9)

ParameterTypeRequiredWhat it controls
-Identity RoleIdParameter yes The Identity parameter specifies the role you want to view. If the role you want to view contains spaces, enclose the name in quotation marks ("). You can use the wildcard character (\*) and a partial role name to...
-GetChildren SwitchParameter yes The GetChildren parameter retrieves a list of all the roles that were created based on the parent role specified in the Identity parameter. You don't need to specify a value with this switch.
-Recurse SwitchParameter yes The Recurse parameter retrieves a list of all the roles that were created based on the parent role specified in the Identity parameter. You don't need to specify a value with this switch.
-Cmdlet String The Cmdlet parameter returns a list of all roles that include the specified cmdlet.
-CmdletParameters String[] The CmdletParameters parameter returns a list of all roles that include the specified parameter or parameters. You can specify more than one parameter by separating each parameter with a comma. If you specify...
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-RoleType RoleType The RoleType parameter returns a list of roles that match the specified role type. For a list of valid role types, see [Understanding management...
-Script String The Script parameter returns a list of all roles that include the specified script.
-ScriptParameters String[] The ScriptParameters parameter returns a list of all roles that include the specified parameter or parameters. You can specify more than one parameter by separating each parameter with a comma. If you specify...

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.