Remove-RDMRoleAssignment
Synopsis
Remove an administrative role assignment.
Syntax
__AllParameterSets
Remove-RDMRoleAssignment [-Role] <PSAdministrativeRole> [-User <PSUserInfo[]>]
[-UserGroup <PSRoleInfo[]>] [-ApplicationIdentity <PSApplicationIdentityInfo[]>] [-WholeScope]
-ScopeType <AdministrativeRoleAssignmentScopeType> [-ScopeID <guid[]>]
[-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Revoke an administrative role from users, user groups, or application identities, at one or more scopes. Use -WholeScope to revoke the role from every principal holding it at those scopes instead of naming them.
Examples
Example 1
PS C:\> Remove-RDMRoleAssignment -Role $role -User (Get-RDMUser -Name "jsmith") -ScopeType Repository -ScopeID $vault.IDRevokes a user's role on a specific vault.
Example 2
Revokes the role from every principal holding it on the vault. Prompts for confirmation; pass -Confirm:$false to skip it.
Parameters
-ApplicationIdentity
Application identities losing 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 revoke
-ScopeID
IDs of the scope resources the role is revoked from: 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 revoked at the wrong scope
-User
Users losing the role
-UserGroup
User groups losing the role
-WhatIf
Shows what would happen if the cmdlet were to run. The cmdlet does not run.
-WholeScope
Revoke the role from every principal holding it at the given scopes, instead of only the ones named
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 revoke
Notes
For more information, type "Get-Help Remove-RDMRoleAssignment -detailed". For technical information, type "Get-Help Remove-RDMRoleAssignment -full".
Last updated
Was this helpful?