Help Center
Choose product document...
Veeam Backup & Replication 9.5
PowerShell Reference

Set-VBRDefaultGateway

Short Description

Modifies cloud default gateways.

Applies to

Platform: VMware, Hyper-V

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

Set-VBRDefaultGateway -Gateway <VBRDefaultGateway> [-IpAddress <string>] [-NetworkMask <string>] [<CommonParameters>]

Detailed Description

This cmdlet modifies the default cloud gateway.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Gateway

Specifies the default cloud gateway you want to modify.

Accepts VBRDefaultGateway type.

True

Named

True (by Value
FromPipeline, ValueFromPipeline
ByPropertyName)

False

IpAddress

Specifies the IP address you want to assign to the default gateway.

False

Named

False

False

NetworkMask

Specifies the network mask you want to assign to the default gateway.

False

Named

False

False

PassThru

Indicates that the command returns the output object to the Windows PowerShell console.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Return Type

VBRDefaultGateway

Example

This example shows how to set the IP address and the network mask of a selected default gateway.

  1. Run Get-VBRDefaultGatewayConfiguration to get all default gateway configurations. Save it to $c variable.
  2. Get all default gateways by name. Save the array of gateways to $alldefaultgateways variable.
  3. Run $alldefaultgateways to see all the names of all gateways available.
  4. Select the first default gateway from the array. Save it to $defaultgateway variable.
  5. Run Set-VBRDefaultGateway to set the IP address and network mask of the selected default gateway.

PS C:\PS> $c = Get-VBRDefaultGatewayConfiguration

PS C:\PS> $alldefaultgateways = $c.Defaultgateway.name

PS C:\PS> $alldefaultgateways

Hardware plan hv network 1

Hardware plan hv network 1 (internet)

PS C:\PS> $defaultgateway = $c.Defaultgateway[0]

PS C:\PS> Set-VBRDefaultGateway -Gateway $defaultgateway -IpAddress "172.16.2.232" -NetworkMask "255.255.0.0"

Related Commands

Set-VBRDefaultGatewayConfiguration

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Endpoint Backup Documentation

Veeam Management Pack Documentation