> 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/de/powershell-commands/set-dsvaultrole.md).

# Set-DSVaultRole

### Übersicht

Legt die zugelassenen Benutzergruppen für einen bestimmten Tresor fest.

### Syntax

#### \_\_AllParameterSets

```
Set-DSVaultRole [-VaultID] <guid> [[-AllowedRolesList] <string[]>] [-Update] [-AsLegacyResponse]
 [<CommonParameters>]
```

### Beschreibung

Legt fest, welche Benutzer Zugriff auf einen bestimmten Tresor haben. Wenn das Flag "Update" vorhanden ist und ein angegebener Benutzername bereits Mitglied des Tresors ist, wird dieser Benutzer entfernt.

### Beispiele

#### Beispiel 1

```powershell
PS C:\> Set-DSVaultRole -AllowedRolesList @("Role1", "Role2") -VaultID "00000000-0000-0000-0000-000000000000"
```

Vor der Ausführung ist keine Rolle im Tresor zugelassen. Nach dem Befehl sind Role1 und Role2 im Tresor zugelassen.

#### Beispiel 2

```powershell
PS C:\> Set-DSVaultRole -AllowedRolesList @("Role3") -VaultID "00000000-0000-0000-0000-000000000000"
```

Vor der Ausführung sind Role1 und Role2 im Tresor zugelassen. Nach dem Befehl ist Role3 die einzige im Tresor zugelassene Rolle.

#### Beispiel 3

```powershell
PS C:\> Set-DSVaultRole -AllowedRolesList @("Role2") -Update -VaultID "00000000-0000-0000-0000-000000000000"
```

Vor der Ausführung ist User1 im Tresor zugelassen. Nach dem Befehl sind Role1 und Role2 im Tresor zugelassen. Das Update-Flag behält die vorherigen Benutzer bei.

#### Beispiel 4

```powershell
PS C:\> Set-DSVaultRole -AllowedRolesList @("User2", "Role3") -Update -VaultID "00000000-0000-0000-0000-000000000000"
```

Vor der Ausführung sind Role1 und Role2 im Tresor zugelassen. Nach dem Befehl sind Role1 und Role3 im Tresor zugelassen. Role2 verliert den Zugriff aufgrund des Vorhandenseins des Update-Flags.

### Parameter

#### -AllowedRolesList

Akzeptiert ein Array von Zeichenfolgen mit Benutzernamen (nicht IDs), die im Tresor zugelassen werden sollen

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

#### -AsLegacyResponse

In Versionen vor 2024.2 gaben viele DS-Cmdlets ein ServerResponse-Objekt zurück. Die Aktivierung dieses Schalters für Rückwärtskompatibilität ermöglicht, dass für frühere Versionen entwickelte Skripte korrekt funktionieren.

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

#### -Update

Aktualisiert die aktuellen Benutzer, anstatt sie zu überschreiben.

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

#### -VaultID

ID des zu aktualisierenden Tresors

```yaml
Type: System.Guid
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### CommonParameters

Dieses Cmdlet unterstützt die allgemeinen Parameter: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction und -WarningVariable. Weitere Informationen finden Sie unter [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Hinweise

Weitere Informationen erhalten Sie durch die Eingabe von "Get-Help Set-DSVaultRole -detailed". Für technische Informationen geben Sie "Get-Help Set-DSVaultRole -full" ein.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell/de/powershell-commands/set-dsvaultrole.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
