> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell/fr/powershell-commands/get-rdmprincipalroleassignment.md).

# Get-RDMPrincipalRoleAssignment

Get-RDMPrincipalRoleAssignment récupère chaque attribution de rôle administratif détenue par un utilisateur, un groupe d'utilisateurs ou une identité d’application dans chaque portée de Remote Desktop

### Synopsis

Récupérer les rôles administratifs détenus par un utilisateur, un groupe d'utilisateurs ou une identité d’application.

### Syntaxe

#### Utilisateur

```
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

Récupérer chaque attribution de rôle administratif détenue par un principal, dans chaque portée. Il s'agit de la recherche inverse de Get-RDMRoleAssignment : au lieu de qui détient un rôle à une portée, elle répond quels rôles un principal détient n'importe où. Utiliser -IncludeIndirect pour faire aussi apparaître les rôles accordés par l'intermédiaire d'un groupe d'utilisateurs auquel le principal appartient ; ces attributions portent le groupe qui accorde dans GroupID et GroupName.

### Exemples

#### Exemple 1

```powershell
PS C:\> Get-RDMUser -Name "jsmith" | Get-RDMPrincipalRoleAssignment
```

Récupère chaque rôle attribué directement à un utilisateur.

#### Exemple 2

```powershell
PS C:\> Get-RDMUser -Name "jsmith" | Get-RDMPrincipalRoleAssignment -IncludeIndirect
```

Inclut aussi les rôles que l'utilisateur détient par l'appartenance à un groupe d'utilisateurs.

#### Exemple 3

```powershell
PS C:\> Get-RDMPrincipalRoleAssignment -ApplicationIdentity (Get-RDMApplicationIdentity -Name "MyServiceApp")
```

Récupère chaque rôle détenu par une identité d’application.

### Paramètres

#### -ApplicationIdentity

Identité d’application à rechercher

```yaml
Type: RemoteDesktopManager.PowerShellModule.PSOutputObject.PSApplicationIdentityInfo
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ApplicationIdentity
  Position: 0
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -ForcePromptAnswer

Commutateur à utiliser avec prudence. Il répondra automatiquement aux invites posant des questions oui/non, oui/non/annuler ou ok/annuler. En cas d'invites multiples, plusieurs valeurs peuvent être passées à ce paramètre. Voici les valeurs acceptées :

* Yes : Accepter l'invite. Couvre les valeurs OK et Automatic.
* No : Refuser l'invite oui/non/annuler. « Cancel » est l'option de repli s'il n'y a pas d'option « No ».
* Cancel : Annuler l'invite oui/non/annuler. « No » est l'option de repli s'il n'y a pas d'option « Cancel ».

```yaml
Type: System.Windows.Forms.DialogResult[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -IncludeIndirect

Inclure aussi les rôles accordés par l'intermédiaire d'un groupe d'utilisateurs auquel le principal appartient, pas seulement les attributions directes

```yaml
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -User

Utilisateur à rechercher

```yaml
Type: RemoteDesktopManager.PowerShellModule.PSOutputObject.PSUserInfo
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: User
  Position: 0
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -UserGroup

Groupe d'utilisateurs à rechercher

```yaml
Type: RemoteDesktopManager.PowerShellModule.PSOutputObject.PSRoleInfo
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: UserGroup
  Position: 0
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### CommonParameters

Cette applet de commande prend en charge les paramètres communs : -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction et -WarningVariable. Pour plus d'informations, consultez [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Entrées

#### RemoteDesktopManager.PowerShellModule.PSOutputObject.PSUserInfo

Utilisateur à rechercher

#### RemoteDesktopManager.PowerShellModule.PSOutputObject.PSRoleInfo

Groupe d'utilisateurs à rechercher

#### RemoteDesktopManager.PowerShellModule.PSOutputObject.PSApplicationIdentityInfo

Identité d’application à rechercher

### Sorties

#### RemoteDesktopManager.PowerShellModule.PSOutputObject.PSPrincipalRoleAssignment

### Notes

Pour plus d'information, tapez « Get-Help Get-RDMPrincipalRoleAssignment -detailed ». Pour de l'information technique, tapez « Get-Help Get-RDMPrincipalRoleAssignment -full ».


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell/fr/powershell-commands/get-rdmprincipalroleassignment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
