> 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/update-dsgatewayfarm.md).

# Update-DSGatewayFarm

### Synopsis

Update a gateway farm

### Syntax

#### \_\_AllParameterSets

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

### Description

Update a gateway farm's properties and membership. The Devolutions Gateway module is required. The gateways used as members will also be updated when this cmdlet is run. A gateway farm's "Members" field is a computed value; manually setting it to a new value changes nothing in itself. To modify a gateway farm's members, use this cmdlet.

### Examples

#### Example 1

```powershell
PS C:\> $farm = Get-DSGateway -GatewayID $farmId
PS C:\> $newGateway = Get-DSGateway -GatewayID $newGatewayId
PS C:\> $updatedMembers = $farm.Members + $newGateway
PS C:\> Update-DSGatewayFarm -GatewayFarmID $farmId -MemberGateways $updatedMembers
```

Add a new gateway to an existing farm by appending to the members array.

#### Example 2

```powershell
PS C:\> $farm = Get-DSGateway -GatewayID $farmId
PS C:\> $updatedMembers = $farm.Members | Where-Object { $_.Id -ne $gatewayToRemoveId }
PS C:\> Update-DSGatewayFarm -GatewayFarmID $farmId -MemberGateways $updatedMembers
```

Remove a gateway from a farm by filtering it out of the members array.

#### Example 3

```powershell
PS C:\> $gateway1 = Get-DSGateway -GatewayID $gateway1Id
PS C:\> $gateway2 = Get-DSGateway -GatewayID $gateway2Id
PS C:\> $gateway3 = Get-DSGateway -GatewayID $gateway3Id
PS C:\> Update-DSGatewayFarm -GatewayFarmID $farmId -MemberGateways $gateway1, $gateway2, $gateway3 -Name "Updated Farm" -Description "Reconfigured farm" -IsDefault $true
```

Replace all farm members with a new set and update the farm's name and description.

#### Example 4

```powershell
PS C:\> $vaultIds = @($vault1Id, $vault2Id, $vault3Id)
PS C:\> Update-DSGatewayFarm -GatewayFarmID $farmId -VaultRoleOverride Custom -CustomVaultAccess $vaultIds
```

Update a gateway farm to grant access only to specific vaults.

### Parameters

#### -CustomVaultAccess

List of vault access roles.

```yaml
Type: System.Guid[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 5
  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: 3
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -GatewayFarmID

ID of the gateway farm to update.

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

#### -IsDefault

Set as the default gateway.

```yaml
Type: System.Boolean
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 (previous members will be replaced).

```yaml
Type: Devolutions.Server.ApiWrapper.Models.Gateway.Gateway[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 2
  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: 1
  IsRequired: false
  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: 4
  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 Update-DSGatewayFarm -detailed". For technical information, type "Get-Help Update-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/update-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.
