Commands › Exchange Online

Add-ManagementRoleEntry

Exchange Online ExchangeOnlineManagement Add-*

Add management role entries to an existing management role.

Quick start script

# Add-ManagementRoleEntry — 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
Add-ManagementRoleEntry -Identity <RoleEntryIdParameter> -ParentRoleEntry <RoleEntryIdParameter> -Role <RoleIdParameter> | Format-List

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

Syntax — 2 parameter sets

Identity

Add-ManagementRoleEntry [-Identity] <RoleEntryIdParameter>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-Force]
 [-Overwrite]
 [-Parameters <String[]>]
 [-PSSnapinName <String>]
 [-Type <ManagementRoleEntryType>]
 [-UnScopedTopLevel]
 [-WhatIf]
 [<CommonParameters>]

ParentRoleEntry

Add-ManagementRoleEntry [-ParentRoleEntry] <RoleEntryIdParameter> -Role <RoleIdParameter>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-Force]
 [-Overwrite]
 [-WhatIf]
 [<CommonParameters>]

Parameters (12)

ParameterTypeRequiredWhat it controls
-Identity RoleEntryIdParameter yes The Identity parameter specifies the role entry that you want to add. This parameter uses the syntax: `Management role\role entry name` (for example, `CustomRole\Set-Mailbox`).
-ParentRoleEntry RoleEntryIdParameter yes The ParentRoleEntry parameter specifies the role entry in the parent role to add to the role specified with the Role parameter. This parameter generally isn't used directly, but exists to enable the piping of role...
-Role RoleIdParameter yes The Role parameter specifies the role to which the new role entry, specified by the ParentRoleEntry parameter, is added.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-Force SwitchParameter This parameter is available only in the cloud-based service.
-Overwrite SwitchParameter The Overwrite switch causes existing role entries to be overwritten by the role entries being added. You don't need to specify a value with this switch.
-Parameters String[] The Parameters parameter specifies the parameters to be included in the role being added. The parameters specified must exist on the cmdlet associated with the role entry. You can specify multiple parameters,...
-PSSnapinName String This parameter is available only in on-premises Exchange.
-Type ManagementRoleEntryType The Type parameter specifies the type of role entry being added. The valid values are Cmdlet, Script and ApplicationPermission.
-UnScopedTopLevel SwitchParameter This parameter is available only in on-premises Exchange.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

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