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

# New-DSGatewaySecurity

New-DSGatewaySecurity opretter en GatewaySecurity objekt brugt at konfigurere sikkerhed indstillinger når creating eller updating en Devolutions Server gateway.

### Synopsis

Opret en ny GatewaySecurity objekt

### Syntaks

#### \_\_AllParameterSets

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

### Description

Opret en ny GatewaySecurity objekt at kan være brugt at konfigurere sikkerhed indstillinger når creating eller updating gateways. Disse indstillinger kan også være konfigureret på gateway rulesets og gateway farms.

### Eksempler

#### Eksempel 1

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

Opret en sikkerhed konfiguration at gives tilladelser til alle bokse og deaktiverer dynamic forbindelser, derefter apply den til en gateway.

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

Opret en sikkerhed konfiguration med adgang limited til specifik bokse, disallow privat bokse, og apply den til en gateway ruleset.

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

Opret en gateway med brugerdefineret tilladelser for specifik brugere, bruger grupper, eller program identiteter og en 5-minut RDP token reuse vindue.

### Parametre

#### -CustomGatewayPermissions

Liste af principal IDs (brugere, bruger grupper, eller program identiteter) når GatewayPermissionOverride er angivet til Brugerdefineret. Brug GUID format eller GUID streng format.

```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 af boks IDs når VaultRoleOverride er angivet til Brugerdefineret. Brug GUID format eller GUID streng format.

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

Deaktivér RDP proxy legitimationsoplysning injection.

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

Disallow dynamic forbindelser gennem gatewayen.

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

Disallow adgang til privat bokse.

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

Disallow RDP reconnection gennem gatewayen.

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

Gateway tilladelse tilsidesættelse tilstand (Standard, Brugerdefineret, Alle, Aldrig). Standard værdi er defineret i system indstillinger. Hvis Brugerdefineret, angive principal IDs med CustomGatewayPermissions.

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

RDP token reuse vindue i minutter. Skal være en positive heltal.

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

Som bokse gatewayen tildeler adgang til (Alle, Brugerdefineret, Aldrig). Hvis Brugerdefineret, angive boks IDs med CustomVaultAccess.

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

Denne cmdlet understøtter de almindelige parametre: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction og -WarningVariable. Yderligere oplysninger finder De i [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Output

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

### Noter

Yderligere oplysninger får De ved at skrive "Get-Help New-DSGatewaySecurity -detailed". Tekniske oplysninger får De ved at skrive "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/da/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.
