Remove-DSRoleAssignment
Synopsis
Remove an administrative role assignment.
Syntax
ByAssignee
Remove-DSRoleAssignment -RoleID <guid> -PrincipalId <guid[]>
-ScopeType <AdministrativeRoleAssignmentScopeType> [-ScopeID <guid[]>] [-WhatIf] [-Confirm]
[<CommonParameters>]WholeScope
Remove-DSRoleAssignment -RoleID <guid> -WholeScope -ScopeType <AdministrativeRoleAssignmentScopeType>
[-ScopeID <guid[]>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Remove specific principals from a role at one or more scopes, or use -WholeScope to remove every member of the role at those scopes in one call.
Examples
Example 1
Remove a single user's 'Vault Owner' assignment on a specific vault.
Example 2
Remove every principal holding the role on the vault. Prompts for confirmation; pass -Confirm:$false to skip it.
Parameters
-Confirm
Prompts for confirmation before running the cmdlet.
-PrincipalId
IDs of the users, user groups, or application identities to remove the role from.
-RoleID
ID of the role.
-ScopeID
IDs of the scope resources to remove the assignment(s) 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; ignored (with a warning) when -ScopeType is Global.
-ScopeType
Scope type of the assignment(s) to remove. Required, there is no default, to avoid silently removing at the wrong scope.
-WhatIf
Shows what would happen if the cmdlet were to run. The cmdlet does not run.
-WholeScope
Remove every principal holding the role at the given scope(s), instead of only the principals listed in -PrincipalId.
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.
Notes
For more information, type "Get-Help Remove-DSRoleAssignment -detailed". For technical information, type "Get-Help Remove-DSRoleAssignment -full".
Last updated
Was this helpful?