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

# New-DSGatewayFarm

### Synopsis

Create a gateway farm.

### Syntax

#### \_\_AllParameterSets

```
New-DSGatewayFarm [-Name] <string> [[-MemberGateways] <Gateway[]>] [[-Description] <string>]
 [[-VaultRoleOverride] <GatewayVaultRoleOverride>] [[-CustomVaultAccess] <guid[]>] [-IsDefault]
 [<CommonParameters>]
```

### Description

Create a gateway farm with member gateways. The Devolutions Gateway module is required. The gateways used as members will also be updated when this cmdlet is run.

### Examples

#### Example 1

```powershell
PS C:\> $gateway1 = Get-DSGateway -GatewayID $gateway1Id
PS C:\> $gateway2 = Get-DSGateway -GatewayID $gateway2Id
PS C:\> New-DSGatewayFarm -Name "Production Farm" -MemberGateways $gateway1, $gateway2
```

Create a gateway farm with two existing gateways as members.

#### Example 2

```powershell
PS C:\> $gateways = Get-DSGateway -All | Where-Object { $_.Name -like 'Prod-*' }
PS C:\> New-DSGatewayFarm -Name "Production Farm" -MemberGateways $gateways -Description "Primary production gateway cluster" -IsDefault
```

Create a default gateway farm containing all gateways with names starting with 'Prod-'.

#### Example 3

```powershell
PS C:\> $gateway1 = Get-DSGateway -GatewayID $gateway1Id
PS C:\> $gateway2 = Get-DSGateway -GatewayID $gateway2Id
PS C:\> New-DSGatewayFarm -Name "Restricted Farm" -MemberGateways $gateway1, $gateway2 -VaultRoleOverride Custom -CustomVaultAccess $vault1Id, $vault2Id, $vault3Id
```

Create a gateway farm with custom vault access, restricting it to specific vaults.

### Parameters

#### -CustomVaultAccess

List of vault access roles.

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

#### -Description

Description of the gateway farm.

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

#### -IsDefault

Set as the default 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: ''
```

#### -MemberGateways

Array of gateways to include as members of the farm.

```yaml
Type: Devolutions.Server.ApiWrapper.Models.Gateway.Gateway[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -Name

Gateway farm's name.

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

#### -VaultRoleOverride

Which vaults the gateway farm grants access to (if custom, specify with CustomVaultAccess).

```yaml
Type: Devolutions.Server.Models.Shared.Models.Gateway.GatewayVaultRoleOverride
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 3
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Notes

For more information, type "Get-Help New-DSGatewayFarm -detailed". For technical information, type "Get-Help New-DSGatewayFarm -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 dynamically by asking a question.

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

```
GET https://docs.devolutions.net/powershell/powershell-commands/new-dsgatewayfarm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
