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

# New-DSGatewaySecurity

New-DSGatewaySecurity crea un objeto GatewaySecurity que se usa para configurar la seguridad al crear o actualizar un gateway de Devolutions Server.

### Sinopsis

Crear un nuevo objeto GatewaySecurity

### Sintaxis

#### \_\_AllParameterSets

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

### Descripción

Crear un nuevo objeto GatewaySecurity que se puede usar para configurar la seguridad al crear o actualizar gateways. Estos ajustes también se pueden configurar en conjuntos de reglas de gateway y granjas de gateways.

### Ejemplos

#### Ejemplo 1

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

Crear una configuración de seguridad que concede permisos a todas las bóvedas y deshabilita las conexiones dinámicas y, a continuación, aplicarla a un gateway.

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

Crear una configuración de seguridad con acceso limitado a bóvedas concretas, no permitir las bóvedas privadas y aplicarla a un conjunto de reglas de gateway.

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

Crear un gateway con permisos personalizados para usuarios, grupos de usuarios o identidades de aplicación concretos y una ventana de reutilización del token RDP de 5 minutos.

### Parámetros

#### -CustomGatewayPermissions

Lista de ID de principales (usuarios, grupos de usuarios o identidades de aplicación) cuando GatewayPermissionOverride está establecido en Custom. Use el formato Guid o el formato de cadena Guid.

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

Lista de ID de bóveda cuando VaultRoleOverride está establecido en Custom. Use el formato Guid o el formato de cadena Guid.

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

Deshabilitar la inyección de credenciales del proxy RDP.

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

Impedir las conexiones dinámicas a través de la puerta de enlace.

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

Impedir el acceso a las bóvedas privadas.

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

Impedir la reconexión RDP a través de la puerta de enlace.

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

Modo de reemplazo de permisos del gateway (Default, Custom, Everyone, Never). El valor Default se define en la configuración del sistema. Si es Custom, especifique los ID de principales con 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

Ventana de reutilización del token RDP en minutos. Debe ser un entero positivo.

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

Bóvedas a las que el gateway concede acceso (All, Custom, Never). Si es Custom, especifique los ID de bóveda con 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

Este cmdlet admite los parámetros comunes: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction y -WarningVariable. Para más información, consulte [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Salidas

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

### Notas

Para más información, escriba "Get-Help New-DSGatewaySecurity -detailed". Para obtener información técnica, escriba "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/es/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.
