TechNet
Export (0) Print
Expand All

Set-ManagementRoleEntry

 

Applies to: Exchange Online, Exchange Server 2016

This cmdlet is available in on-premises Exchange Server 2016 and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.

Use the Set-ManagementRoleEntry cmdlet to change the available parameters on an existing management role entry.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Set-ManagementRoleEntry -Identity <RoleEntryIdParameter> [-AddParameter <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-Force <SwitchParameter>] [-Parameters <String[]>] [-RemoveParameter <SwitchParameter>] [-UnScopedTopLevel <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

This example removes the Anr and Database parameters from the Get-Mailbox role entry on the Help Desk Personnel role.

Set-ManagementRoleEntry "Help Desk Personnel\Get-Mailbox" -Parameters Anr, Database -RemoveParameter

This example retrieves a list of role entries on the Help Desk Personnel role and adds the WhatIf switch to each role entry using the Set-ManagementRoleEntry cmdlet.

Get-ManagementRoleEntry "Help Desk Personnel\*" | Set-ManagementRoleEntry -Parameters WhatIf -AddParameter

This example adds the DisplayName and ForwardingAddress parameters to the Set-Mailbox role entry on the Tier 1 Help Desk role and removes all other parameters from the role entry.

Set-ManagementRoleEntry "Tier 1 Help Desk\Set-Mailbox" -Parameters DisplayName, ForwardingAddress

This example adds the Location parameter to the MailboxAudit custom script on the IT Scripts unscoped top level role.

Set-ManagementRoleEntry "IT Scripts\MailboxAudit" -Parameters Location -AddParameter -UnScopedTopLevel

The Set-ManagementRoleEntry cmdlet changes the available parameters on an existing role entry. If you want to add parameters to a role entry, the parameters must exist in the role entry in the parent management role. If you want to remove parameters from a role entry, there can be no role entries in child roles that inherit those parameters from the role entry you want to change. You can't change role entries associated with built-in roles.

For more information about management role entries, see Understanding management roles.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Management role entries" entry in the Role management permissions topic.

 

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.RoleEntryIdParameter

The Identity parameter specifies the role entry to change. You must specify the value of the Identity parameter in the format, <management role>\<role entry name>, for example, ExampleRole\Set-Mailbox.

For more information about how management role entries work, see Understanding management roles.

If the role entry name contains spaces, enclose it in quotation marks (").

AddParameter

Optional

System.Management.Automation.SwitchParameter

The AddParameter parameter adds the specified parameters to the specified role entry. Use the Parameters parameter to specify the parameters to add. You can't use the AddParameter parameter in the same command as the RemoveParameter parameter.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.

  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

This parameter is available only in on-premises Exchange 2016.

The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name (FQDN). For example, dc01.contoso.com.

Force

Optional

System.Management.Automation.SwitchParameter

The Force switch specifies whether to suppress warning or confirmation messages. You can use this switch to run tasks programmatically where prompting for administrative input is inappropriate. You don't need to specify a value with this switch.

Parameters

Optional

System.String[]

The Parameters parameter specifies the parameters to be added to or removed from the role entry.

The Parameters parameter has the following modes:

  • When used with the AddParameter parameter, the parameters you specify are added to the role entry.

  • When used with the RemoveParameter parameter, the parameters you specify are removed from the role entry.

  • When neither the AddParameter nor RemoveParameter parameters are used, only the parameters you specify are included in the role entry. If you specify a value of $Null and neither the AddParameter nor RemoveParameter parameters are used, all of the parameters on the role entry are removed.

You can specify multiple parameters, separated with commas.

RemoveParameter

Optional

System.Management.Automation.SwitchParameter

The RemoveParameter parameter removes the specified parameters from the specified role entry. Use the Parameters parameter to specify the parameters to remove. You can't use the RemoveParameter parameter in the same command as the AddParameter parameter.

UnScopedTopLevel

Optional

System.Management.Automation.SwitchParameter

The UnScopedTopLevel switch must be used when you want to modify a role entry on an unscoped top level role.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

 
Show:
© 2016 Microsoft