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

# New-DSGatewaySecurity

New-DSGatewaySecurity crea un oggetto GatewaySecurity usato per configurare le impostazioni di sicurezza durante la creazione o l'aggiornamento di un gateway di Devolutions Server.

### Sinossi

Creare un nuovo oggetto GatewaySecurity

### Sintassi

#### \_\_AllParameterSets

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

### Descrizione

Creare un nuovo oggetto GatewaySecurity utilizzabile per configurare le impostazioni di sicurezza durante la creazione o l'aggiornamento dei gateway. Queste impostazioni possono essere configurate anche sui set di regole dei gateway e sulle farm di gateway.

### Esempi

#### Esempio 1

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

Creare una configurazione di sicurezza che concede autorizzazioni a tutte le casseforti e disabilita le connessioni dinamiche, quindi applicarla a un gateway.

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

Creare una configurazione di sicurezza con accesso limitato a casseforti specifiche, non consentire le casseforti private e applicarla a un set di regole del gateway.

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

Creare un gateway con autorizzazioni personalizzate per utenti, gruppi di utenti o identità applicazione specifici e una finestra di riutilizzo del token RDP di 5 minuti.

### Parametri

#### -CustomGatewayPermissions

Elenco di ID di principal (utenti, gruppi di utenti o identità applicazione) quando GatewayPermissionOverride è impostato su Custom. Usare il formato Guid o il formato di stringa 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

Elenco di ID di cassaforte quando VaultRoleOverride è impostato su Custom. Usare il formato Guid o il formato di stringa 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

Disabilitare l'iniezione delle credenziali 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

Impedire le connessioni dinamiche tramite il gateway.

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

Impedire l'accesso alle casseforti private.

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

Impedire la riconnessione RDP tramite il gateway.

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

Modalità di sostituzione delle autorizzazioni del gateway (Default, Custom, Everyone, Never). Il valore Default è definito nelle impostazioni di sistema. Se Custom, specificare gli ID dei principal 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

Finestra di riutilizzo del token RDP in minuti. Deve essere un intero 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

Quali casseforti il gateway autorizza (All, Custom, Never). Se Custom, specificare gli ID di cassaforte 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

Questo cmdlet supporta i parametri comuni: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction e -WarningVariable. Per maggiori informazioni, veda [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Output

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

### Note

Per maggiori informazioni, digiti "Get-Help New-DSGatewaySecurity -detailed". Per informazioni tecniche, digiti "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/it/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.
