Commands › Exchange Online
Get-ManagementRole
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)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.