Resize-AzureRmVirtualNetworkGateway

Resizes an existing virtual network gateway.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Resize-AzureRmVirtualNetworkGateway
      -VirtualNetworkGateway <PSVirtualNetworkGateway>
      -GatewaySku <String>
      [-DefaultProfile <IAzureContextContainer>]
      [<CommonParameters>]

Description

The Resize-AzureRmVirtualNetworkGateway cmdlet enables you to change the stock-keeping unit (SKU) for a virtual network gateway. SKUs determine the capabilities of a gateway, including such things as throughput and the maximum number of IP tunnels that are allowed. Azure supports Basic, Standard, High-Performance, VpnGw1, VpnGw2, VpnGw3, VpnGw1AZ, VpnGw2AZ, VpnGw3AZ, ErGw1AZ, ErGw2AZ, ErGw3AZ SKUs (sometimes referred to as Small, Medium, and Large SKUs). For detailed information about the capabilities of each SKU type, see https://azure.microsoft.com/en-us/documentation/articles/vpn-gateway-about-vpngateways/. Keep in mind that SKUs differ in pricing as well as capabilities. For more information, see https://azure.microsoft.com/en-us/pricing/details/vpn-gateway/.

Examples

Example 1: Change the size of a virtual network gateway

PS C:\>$Gateway = Get-AzureRmVirtualNetworkGateway -Name "ContosoVirtualGateway"
PS C:\> Resize-AzureRmVirtualNetworkGateway -VirtualNetworkGateway $Gateway -GatewaySku "Basic"

This example changes the size of a virtual network gateway named ContosoVirtualGateway. The first command creates an object reference to ContosoVirtualGateway; this object reference is stored in a variable named $Gateway. The second command then uses the Resize-AzureRmVirtualNetworkGateway cmdlet to set the GatewaySku property to Basic.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GatewaySku

Specifies the new type of gateway SKU. The acceptable values for this parameter are:

  • Basic
  • Standard
  • High Performance
  • VpnGw1
  • VpnGw2
  • VpnGw3
  • VpnGw1AZ
  • VpnGw2AZ
  • VpnGw3AZ
  • ErGw1AZ
  • ErGw2AZ
  • ErGw3AZ
Type:String
Accepted values:Basic, Standard, HighPerformance, UltraPerformance, VpnGw1, VpnGw2, VpnGw3, VpnGw1AZ, VpnGw2AZ, VpnGw3AZ, ErGw1AZ, ErGw2AZ, ErGw3AZ
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VirtualNetworkGateway

Specifies an object reference to the virtual network gateway to be resized. You can create this object reference by using the Get-AzureRmVirtualNetworkGateway and specifying the name of the gateway.

Type:PSVirtualNetworkGateway
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

PSVirtualNetworkGateway

Parameters: VirtualNetworkGateway (ByValue)

String

Outputs

PSVirtualNetworkGateway

Notes

You cannot resize from Basic/Standard/HighPerformance SKUs to the new VpnGw1/VpnGw2/VpnGw3 SKUs. Further resize is not allowed from/to VpnGw1AZ/VpnGw2AZ/VpnGw3AZ or ErGw1AZ/ErGw2AZ/ErGw3AZ. Resize is allowed only within the SKU 'series' e.g VpnGw1AZ can be resized to/from VpnGw2AZ/VpnGw3AZ and ErGw1AZ can be resized to/from ErGw2AZ/ErGw3AZ. See https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpngateways for instructions.