Set-​Azure​Rm​Virtual​Network​Gateway

Updates a virtual network gateway.

Syntax

Set-AzureRmVirtualNetworkGateway
   [-Asn <UInt32>]
   [-DisableActiveActiveFeature]
   [-EnableActiveActiveFeature]
   [-GatewayDefaultSite <PSLocalNetworkGateway>]
   [-GatewaySku <String>]
   [-PeerWeight <Int32>]
   -VirtualNetworkGateway <PSVirtualNetworkGateway>
   [-VpnClientAddressPool <System.Collections.Generic.List`1[System.String]>]
   [-VpnClientRevokedCertificates <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSVpnClientRevokedCertificate]>]
   [-VpnClientRootCertificates <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSVpnClientRootCertificate]>]
   [<CommonParameters>]

Description

The Set-AzureRmVirtualNetworkGateway cmdlet updates a virtual network gateway.

Examples

Example 1: Set the goal state a virtual network gateway

PS C:\>$Gateway = Get-AzureRmVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
PS C:\> Set-AzureRmVirtualNetworkGateway -VirtualNetworkGateway $Gateway -Asn 1337

The first command gets a virtual network gateway named Gateway01 that belongs to resource group ResourceGroup001 and stores it to the variable named $Gateway

The second command sets the goal state for the virtual network gateway stored in variable $Gateway. The command also sets the ASN to 1337.

Required Parameters

-VirtualNetworkGateway

Specifies the virtual network gateway object to base modifications off of. You can use the Get-AzureRmVirtualNetworkGateway cmdlet to get the virtual network gateway object.

Type:PSVirtualNetworkGateway
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Asn

Specifies the virtual network gateway Autonomous System Number (ASN) that is used to set up Border Gateway Protocol (BGP) sessions inside IPsec tunnels.

Type:UInt32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DisableActiveActiveFeature

Disables the active-active feature.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableActiveActiveFeature

Enables the active-active feature.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-GatewayDefaultSite

Specifies the default site to use for force tunneling. If a default site is specified, all internet traffic from the gateway's Virtual Private Network (VPN) is routed to that site.

Type:PSLocalNetworkGateway
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-GatewaySku

Specifies the stock keeping unit (SKU) of the virtual network gateway. The acceptable values for this parameter are:

  • Basic
  • Standard
  • HighPerformance
  • VpnGw1
  • VpnGw2
  • VpnGw3
Type:String
Parameter Sets:Basic, Standard, HighPerformance, UltraPerformance, VpnGw1, VpnGw2, VpnGw3
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PeerWeight

Specifies the weight added to routes learned over BGP from this virtual network gateway

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-VpnClientAddressPool

Specifies the address space that this cmdlet uses to allocate VPN client IP addresses from. This should not overlap with virtual network or on-premise ranges.

Type:System.Collections.Generic.List`1[System.String]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-VpnClientRevokedCertificates

Specifies a list of revoked VPN client certificates. A VPN client presenting a certificate that matches one of these is removed.

Type:System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSVpnClientRevokedCertificate]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-VpnClientRootCertificates

Specifies a list of VPN client root certificates to use for VPN client authentication. Connecting VPN clients must present certificates generated from one of these root certificates.

Type:System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSVpnClientRootCertificate]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Notes

  • Keywords: azure, azurerm, arm, resource, management, manager, network, networking