For the complete documentation index, see llms.txt. This page is also available as Markdown.

Add-RDMRoleAssignment

Synopsis

Assign an administrative role to users, user groups, or application identities.

Syntax

__AllParameterSets

Add-RDMRoleAssignment [-Role] <PSAdministrativeRole> [-User <PSUserInfo[]>] [-UserGroup <PSRoleInfo[]>]
 [-ApplicationIdentity <PSApplicationIdentityInfo[]>] -ScopeType <AdministrativeRoleAssignmentScopeType>
 [-ScopeID <guid[]>] [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Grant an administrative role to users, user groups, or application identities, at one or more scopes. Unlike Add-RDMUserVaultAccess, which always grants the workspace's configured vault-assignment role on a vault, this assigns any role at any scope the role supports.

Examples

Example 1

PS C:\> $role = Get-RDMAdministrativeRole -Name "Vault Owner"
PS C:\> $vault = Get-RDMVault -Name "Production"
PS C:\> Add-RDMRoleAssignment -Role $role -User (Get-RDMUser -Name "jsmith") -ScopeType Repository -ScopeID $vault.ID

Grants the 'Vault Owner' role to a user on a specific vault.

Example 2

Grants a role to an application identity across the whole workspace.

Example 3

Grants every vault-assignable role to several user groups on two vaults.

Parameters

-ApplicationIdentity

Application identities receiving the role

-Confirm

Prompts for confirmation before running the cmdlet.

-ForcePromptAnswer

Switch to use with caution. It will automatically answer prompt asking yes/no, yes/no/cancel, or ok/cancel questions. In case of multiple prompts, multiple values can be passed to this parameter. Here are the accepted values:

  • Yes: Accept the prompt. Cover the OK and Automatic value.

  • No: Refuse the yes/no/cancel prompt. "Cancel" is the fallback option if there is no "No" option.

  • Cancel: Cancel the yes/no/cancel prompt. "No" is the fallback option if there is no "Cancel" option.

-Role

Administrative role to assign

-ScopeID

IDs of the scope resources the role is assigned on: vault IDs when -ScopeType is Repository, gateway IDs when Gateway, PAM provider IDs when PamProvider, or business unit IDs when OrganizationalUnit. Required unless -ScopeType is Global

-ScopeType

Scope type of the assignment. There is no default, so that a role is never silently assigned at the wrong scope

-User

Users receiving the role

-UserGroup

User groups receiving the role

-WhatIf

Shows what would happen if the cmdlet were to run. The cmdlet does not run.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

RemoteDesktopManager.PowerShellModule.PSOutputObject.PSAdministrativeRole

Administrative role to assign

Notes

For more information, type "Get-Help Add-RDMRoleAssignment -detailed". For technical information, type "Get-Help Add-RDMRoleAssignment -full".

Last updated

Was this helpful?