> 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/new-dsgatewaysecurity.md).

# New-DSGatewaySecurity

New-DSGatewaySecurity erstellt ein GatewaySecurity-Objekt, mit dem Sicherheitseinstellungen beim Erstellen oder Aktualisieren eines Devolutions Server-Gateways konfiguriert werden.

### Übersicht

Ein neues GatewaySecurity-Objekt erstellen

### Syntax

#### \_\_AllParameterSets

```
New-DSGatewaySecurity [-GatewayPermissionOverride <SecurityRoleOverride>]
 [-CustomGatewayPermissions <guid[]>] [-VaultRoleOverride <GatewayVaultRoleOverride>]
 [-CustomVaultAccess <guid[]>] [-RDPTokenReuseWindow <int>] [-DisallowDynamicConnections]
 [-DisallowPrivateVaults] [-DisallowRDPReconnection] [-DisableRdpProxyCredentialInjection]
 [<CommonParameters>]
```

### Beschreibung

Ein neues GatewaySecurity-Objekt erstellen, mit dem Sicherheitseinstellungen beim Erstellen oder Aktualisieren von Gateways konfiguriert werden können. Diese Einstellungen können auch für Gateway-Regelsätze und Gateway-Farmen konfiguriert werden.

### Beispiele

#### Beispiel 1

```powershell
PS C:\> $security = New-DSGatewaySecurity -VaultRoleOverride All -DisallowDynamicConnections
PS C:\> Update-DSGateway -GatewayID $gatewayId -Security $security
```

Eine Sicherheitskonfiguration erstellen, die Berechtigungen für alle Tresore erteilt und dynamische Verbindungen deaktiviert, und sie anschließend auf ein Gateway anwenden.

#### Beispiel 2

```powershell
PS C:\> $vaultIds = @($vaultId1, $vaultId2)
PS C:\> $security = New-DSGatewaySecurity -VaultRoleOverride Custom -CustomVaultAccess $vaultIds -DisallowPrivateVaults
PS C:\> Update-DSGatewayRuleset -GatewayID $gatewayRulesetId -Security $security
```

Eine Sicherheitskonfiguration mit auf bestimmte Tresore beschränktem Zugriff erstellen, private Tresore untersagen und sie auf einen Gateway-Regelsatz anwenden.

#### Beispiel 3

```powershell
PS C:\> $principalIds = @($principalId1, $principalId2)
PS C:\> $security = New-DSGatewaySecurity -GatewayPermissionOverride Custom -CustomGatewayPermissions $principalIds -RDPTokenReuseWindow 5
PS C:\> New-DSGateway -Name 'MyGateway' -DevolutionsGatewayUrl 'https://gateway.example.com' -TCPListeningPort 8181 -Security $security
```

Ein Gateway mit benutzerdefinierten Berechtigungen für bestimmte Benutzer, Benutzergruppen oder Anwendungsidentitäten und einem 5-minütigen Fenster zur Wiederverwendung des RDP-Tokens erstellen.

### Parameter

#### -CustomGatewayPermissions

Liste der Prinzipal-IDs (Benutzer, Benutzergruppen oder Anwendungsidentitäten), wenn GatewayPermissionOverride auf Custom festgelegt ist. Guid-Format oder Guid-Zeichenfolgenformat verwenden.

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

#### -CustomVaultAccess

Liste der Tresor-IDs, wenn VaultRoleOverride auf Custom festgelegt ist. Guid-Format oder Guid-Zeichenfolgenformat verwenden.

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

#### -DisableRdpProxyCredentialInjection

Einfügen von Anmeldeinformationen des RDP-Proxys deaktivieren.

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

#### -DisallowDynamicConnections

Dynamische Verbindungen über das Gateway untersagen.

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

#### -DisallowPrivateVaults

Zugriff auf private Tresore untersagen.

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

#### -DisallowRDPReconnection

RDP-Wiederverbindung über das Gateway untersagen.

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

#### -GatewayPermissionOverride

Überschreibungsmodus für Gateway-Berechtigungen (Default, Custom, Everyone, Never). Der Wert Default ist in den Systemeinstellungen definiert. Bei Custom die Prinzipal-IDs mit CustomGatewayPermissions angeben.

```yaml
Type: Devolutions.RemoteDesktopManager.SecurityRoleOverride
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -RDPTokenReuseWindow

Fenster für die Wiederverwendung des RDP-Tokens in Minuten. Muss eine positive ganze Zahl sein.

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

#### -VaultRoleOverride

Auf welche Tresore das Gateway Zugriff gewährt (All, Custom, Never). Bei Custom die Tresor-IDs mit CustomVaultAccess angeben.

```yaml
Type: Devolutions.Server.Models.Shared.Models.Gateway.GatewayVaultRoleOverride
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  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).

### Ausgaben

#### Devolutions.Server.Models.Shared.Models.Gateway.GatewaySecurity

### Hinweise

Weitere Informationen erhalten Sie mit "Get-Help New-DSGatewaySecurity -detailed". Technische Informationen erhalten Sie mit "Get-Help New-DSGatewaySecurity -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/de/powershell-commands/new-dsgatewaysecurity.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.
