This document provides a comprehensive reference for Azure PowerShell cmdlets used to manage VPN client connections for Azure Virtual Network Gateways. These cmdlets are essential for configuring, troubleshooting, and monitoring the VPN client connectivity to your Azure virtual networks.
The following cmdlets are available for managing VPN client connections. They enable you to generate client configuration packages, retrieve connection status, and manage various aspects of the VPN client experience.
These cmdlets are often used in conjunction with design templates for setting up secure remote access to Azure resources. Here are some common scenarios:
To enable your users to connect to your Azure virtual network using Point-to-Site (P2S) VPN, you need to provide them with a client configuration package. This package contains the necessary certificates and settings.
This example shows how to get the client configuration for an IKEv2 VPN client.
# Sign in to your Azure account
Login-AzAccount
# Set your subscription context
Set-AzContext -SubscriptionId ""
# Define resource group and gateway name
$resourceGroupName = "MyResourceGroup"
$gatewayName = "myVpnGateway"
# Get the client configuration for IKEv2
Get-AzVpnClientConfiguration -VirtualNetworkGatewayName $gatewayName -ResourceGroupName $resourceGroupName -VpnClientProtocol IKEv2 -OutputFolder .\ClientConfig
Write-Host "VPN client configuration downloaded to .\ClientConfig"
 You can use these cmdlets to monitor the health and usage of your VPN client connections, which is crucial for troubleshooting and ensuring optimal performance.
This example retrieves the connection health status for all connected VPN clients.
# Sign in to your Azure account
Login-AzAccount
# Set your subscription context
Set-AzContext -SubscriptionId ""
# Define resource group and gateway name
$resourceGroupName = "MyResourceGroup"
$gatewayName = "myVpnGateway"
# Get VPN client connection health
Get-AzVpnClientConnectionHealth -VirtualNetworkGatewayName $gatewayName -ResourceGroupName $resourceGroupName
 Install-Module -Name Az -AllowClobber -Scope CurrentUser