This documentation section provides reference for PowerShell cmdlets related to managing Azure Virtual Network Gateway VPN client connections. These cmdlets allow you to configure, monitor, and troubleshoot VPN connections from client devices to your Azure Virtual Network Gateway.
Azure VPN Gateway enables secure, hybrid cloud connectivity by connecting your on-premises networks to Azure Virtual Networks. VPN client connections allow individual users or devices to connect directly to your Azure VNet through a VPN tunnel, offering enhanced security for remote access scenarios.
The following cmdlets are categorized by the cost providers they typically fall under within Azure's billing structure. For detailed cost information, please refer to the Azure Pricing Calculator.
Get-AzVpnClientConfiguration -GatewayName <String> -ResourceGroupName <String> [-VpnClientProtocol <VpnClientProtocol>] [-OutputBlobPath <String>] [-Force] [<CommonParameters>]# Download the IKEv2 VPN client configuration for a gateway
                    Get-AzVpnClientConfiguration -GatewayName "MyGateway" -ResourceGroupName "MyResourceGroup" -VpnClientProtocol IkeV2 -OutputBlobPath "C:\VPNConfigs\MyGateway_IKEv2.zip"Set-AzVpnClientConfiguration -VirtualNetworkGateway <VirtualNetworkGateway> -VpnClientConfiguration <VpnClientConfiguration> [<CommonParameters>]# This cmdlet is typically used in conjunction with other cmdlets to build the VpnClientConfiguration object.
                    # Refer to the Azure PowerShell documentation for comprehensive examples.Add-AzVpnClientRootCertificate -VirtualNetworkGatewayName <String> -ResourceGroupName <String> -PublicCertData <String> [<CommonParameters>]# Add a root certificate to the VPN Gateway
                    $certPath = "C:\Certificates\MyRootCA.cer"
                    $cert = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new($certPath)
                    $publicCertData = $cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Cert) | ConvertTo-Base64
                    Add-AzVpnClientRootCertificate -VirtualNetworkGatewayName "MyGateway" -ResourceGroupName "MyResourceGroup" -PublicCertData $publicCertDataRemove-AzVpnClientRootCertificate -VirtualNetworkGatewayName <String> -ResourceGroupName <String> -Thumbprint <String> [<CommonParameters>]# Remove a root certificate by its thumbprint
                    Remove-AzVpnClientRootCertificate -VirtualNetworkGatewayName "MyGateway" -ResourceGroupName "MyResourceGroup" -Thumbprint "A1B2C3D4E5F6..."Get-AzVirtualNetworkGatewayVpnClientRevokedCertificate -VirtualNetworkGatewayName <String> -ResourceGroupName <String> [-Thumbprint <String>] [<CommonParameters>]Add-AzVirtualNetworkGatewayVpnClientRevokedCertificate -VirtualNetworkGatewayName <String> -ResourceGroupName <String> -Thumbprint <String> -Name <String> [<CommonParameters>]Remove-AzVirtualNetworkGatewayVpnClientRevokedCertificate -VirtualNetworkGatewayName <String> -ResourceGroupName <String> -Thumbprint <String> [<CommonParameters>]If you encounter issues with VPN client connections, consider the following:
Test-AzVirtualNetworkGatewayConnection (if applicable) to diagnose connectivity.