Set-​Azure​Rm​Virtual​Network​Gateway​Vpn​Client​Config

Sets the VPN client address pool for a virtual network gateway.

Syntax

Set-AzureRmVirtualNetworkGatewayVpnClientConfig
   -VirtualNetworkGateway <PSVirtualNetworkGateway>
   -VpnClientAddressPool <System.Collections.Generic.List`1[System.String]>
   [<CommonParameters>]

Description

The Set-AzureRmVirtualNetworkVpnClientConfig cmdlet configures the client address pool for a virtual network gateway. Virtual private network (VPN) clients that connect to this gateway will be assigned an IP address from this address pool.

Examples

Example 1: Assign a VPN client address pool to a virtual network gateway

PS C:\>$Gateway = Get-AzureRmVirtualNetworkGateway -Name "ContosoVirtualGateway"
PS C:\> Set-AzureRmVirtualNetworkGatewayVpnClientConfig -VirtualNetworkGateway $Gateway -VpnClientAddressPool "10.0.0.0/16"

This example assigns a VPN client address pool to a virtual network gateway named ContosoVirtualGateway.

The first command creates an object reference to the gateway and the object is stored in a variable named $Gateway.

The second command in the example then uses the Set-AzureRmVirtualNetworkGatewayVpnClientConfig cmdlet to assign the address pool 10.0.0.0/16 to ContosoVirtualGateway.

Required Parameters

-VirtualNetworkGateway

Specifies an object reference to the virtual network gateway that contains the VPN client configuration settings that this cmdlet modifies. You can create an object reference to a virtual network gateway by using the Get-AzureRmVirtualNetworkGateway and specifying the name of the gateway.

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

Specifies the IP addresses to be assigned to clients connecting to this gateway

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

Inputs

This cmdlet accepts pipelined instances of the Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGateway object.

Outputs

This cmdlet modifies existing instances of the Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGateway object.