Azure Virtual Network Gateway VPN Client Connection Cmdlets
This section provides a reference for PowerShell cmdlets used to manage VPN client connections for Azure Virtual Network Gateways.
Overview
Azure VPN Gateway enables you to create a secure VPN connection between your on-premises network and your Azure Virtual Network, or between two Azure Virtual Networks. Managing VPN client connections is crucial for ensuring seamless and secure remote access.
Cmdlet Categories
The following cmdlets are commonly used for managing VPN client connections:
Get VPN Client Connection Cmdlets
- 
                    Get-AzVirtualNetworkGatewayVpnClientConnectionConfiguration
                    Retrieves the VPN client connection configuration for a Virtual Network Gateway. Get-AzVirtualNetworkGatewayVpnClientConnectionConfiguration -VirtualNetworkGatewayName <string> -ResourceGroupName <string>Parameters:- -VirtualNetworkGatewayName: The name of the Virtual Network Gateway.
- -ResourceGroupName: The name of the resource group.
 
- 
                    Get-AzVirtualNetworkGatewayVpnClientIpsecParameters
                    Retrieves the IPsec parameters for a VPN client connection. Get-AzVirtualNetworkGatewayVpnClientIpsecParameters -VirtualNetworkGatewayName <string> -ResourceGroupName <string>Parameters:- -VirtualNetworkGatewayName: The name of the Virtual Network Gateway.
- -ResourceGroupName: The name of the resource group.
 
Set VPN Client Connection Cmdlets
- 
                    Set-AzVirtualNetworkGatewayVpnClientConnectionConfiguration
                    Configures the VPN client connection settings for a Virtual Network Gateway. Set-AzVirtualNetworkGatewayVpnClientConnectionConfiguration -VirtualNetworkGatewayName <string> -ResourceGroupName <string> -VpnClientAddressPool <string[]> [-VpnClientProtocol <VpnClientProtocol[]>] [-DnsServer <string[]>] [-RadiusServer <string>] [-RadiusSecret <securestring>]Parameters:- -VirtualNetworkGatewayName: The name of the Virtual Network Gateway.
- -ResourceGroupName: The name of the resource group.
- -VpnClientAddressPool: An array of IP address pools to be assigned to VPN clients.
- -VpnClientProtocol: The VPN client protocols to enable (e.g., 'IkeV2', 'SSTP', 'OpenVPN').
- -DnsServer: An array of DNS server IP addresses for clients.
- -RadiusServer: The IP address or FQDN of the RADIUS server for EAP-RADIUS authentication.
- -RadiusSecret: The shared secret for RADIUS authentication.
 Tip: Use this cmdlet to specify the IP address ranges from which VPN clients will receive IP addresses when they connect. You can also configure DNS servers and RADIUS authentication.
- 
                    Set-AzVirtualNetworkGatewayVpnClientIpsecParameters
                    Configures the IPsec parameters for a VPN client connection. Set-AzVirtualNetworkGatewayVpnClientIpsecParameters -VirtualNetworkGatewayName <string> -ResourceGroupName <string> -IpsecParameters <PSObject>Parameters:- -VirtualNetworkGatewayName: The name of the Virtual Network Gateway.
- -ResourceGroupName: The name of the resource group.
- -IpsecParameters: A PSObject containing the IPsec parameters. This is typically created using New-AzVirtualNetworkGatewayIpsecParameters.
 
New VPN Client Connection Cmdlets
- 
                    New-AzVirtualNetworkGatewayIpsecParameters
                    Creates a new IPsec parameters object for VPN client connections. New-AzVirtualNetworkGatewayIpsecParameters -SaDataSizeKilobytes <int> -Ph2Algorithm <string> -Ph2Integrity <string> -IpsecEncryption <string> -IpsecIntegrity <string> -PfsGroup <string> -DhGroup <string>Parameters:- -SaDataSizeKilobytes: Data size in KB for Security Association.
- -Ph2Algorithm: Phase 2 encryption algorithm.
- -Ph2Integrity: Phase 2 integrity algorithm.
- -IpsecEncryption: IPsec encryption algorithm.
- -IpsecIntegrity: IPsec integrity algorithm.
- -PfsGroup: Perfect Forward Secrecy group.
- -DhGroup: Diffie-Hellman group.
 Note: This cmdlet creates an object that can be passed toSet-AzVirtualNetworkGatewayVpnClientIpsecParameters.
Remove VPN Client Connection Cmdlets
- 
                    Remove-AzVirtualNetworkGatewayVpnClientConnectionConfiguration
                    Removes the VPN client connection configuration from a Virtual Network Gateway. Remove-AzVirtualNetworkGatewayVpnClientConnectionConfiguration -VirtualNetworkGatewayName <string> -ResourceGroupName <string>Parameters:- -VirtualNetworkGatewayName: The name of the Virtual Network Gateway.
- -ResourceGroupName: The name of the resource group.