Get-RDMPrincipalRoleAssignment
Synopsis
Retrieve the administrative roles held by a user, user group, or application identity.
Syntax
User
Get-RDMPrincipalRoleAssignment [-User] <PSUserInfo> [-IncludeIndirect]
[-ForcePromptAnswer <DialogResult[]>] [<CommonParameters>]UserGroup
Get-RDMPrincipalRoleAssignment [-UserGroup] <PSRoleInfo> [-IncludeIndirect]
[-ForcePromptAnswer <DialogResult[]>] [<CommonParameters>]ApplicationIdentity
Get-RDMPrincipalRoleAssignment [-ApplicationIdentity] <PSApplicationIdentityInfo> [-IncludeIndirect]
[-ForcePromptAnswer <DialogResult[]>] [<CommonParameters>]Description
Retrieve every administrative role assignment held by a principal, across every scope. This is the reverse lookup of Get-RDMRoleAssignment: instead of who holds a role at a scope, it answers which roles a principal holds anywhere. Use -IncludeIndirect to also surface the roles granted through a user group the principal belongs to; those assignments carry the granting group in GroupID and GroupName.
Examples
Example 1
Retrieves every role directly assigned to a user.
Example 2
Also includes the roles the user holds through user group membership.
Example 3
Retrieves every role held by an application identity.
Parameters
-ApplicationIdentity
Application identity to look up
-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.
-IncludeIndirect
Also include the roles granted through a user group the principal belongs to, not just the direct assignments
-User
User to look up
-UserGroup
User group to look up
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.PSUserInfo
User to look up
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSRoleInfo
User group to look up
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSApplicationIdentityInfo
Application identity to look up
Outputs
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSPrincipalRoleAssignment
Notes
For more information, type "Get-Help Get-RDMPrincipalRoleAssignment -detailed". For technical information, type "Get-Help Get-RDMPrincipalRoleAssignment -full".
Last updated
Was this helpful?