Get-AzVpnClientConnectionHealth

SYNOPSIS

Gets the VPN client connection health for a virtual network gateway.

DESCRIPTION

The Get-AzVpnClientConnectionHealth cmdlet retrieves the current health status of VPN client connections established to an Azure virtual network gateway.

This cmdlet is useful for monitoring the connectivity and performance of your VPN clients and diagnosing any connection-related issues.

INPUTS

OUTPUTS

SYNTAX

Get-AzVpnClientConnectionHealth -VirtualNetworkGatewayName <String> -ResourceGroupName <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
Get-AzVpnClientConnectionHealth -InputObject <PSVirtualNetworkGateway> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

PARAMETERS

Name Type Description Required?
VirtualNetworkGatewayName System.String Specifies the name of the virtual network gateway. Yes
ResourceGroupName System.String Specifies the name of the resource group to which the virtual network gateway belongs. Yes
InputObject Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGateway Specifies the virtual network gateway object. Yes
DefaultProfile Microsoft.Azure.Commands.Common.Authentication.IAzureContextContainer The credentials, account, tenant, and subscription for the user. No

EXAMPLE 1

Get VPN client connection health for a virtual network gateway by name and resource group.

Get-AzVpnClientConnectionHealth -VirtualNetworkGatewayName "MyVpnGateway" -ResourceGroupName "MyResourceGroup"

EXAMPLE 2

Get VPN client connection health for a virtual network gateway using an input object.

$gateway = Get-AzVirtualNetworkGateway -Name "MyVpnGateway" -ResourceGroupName "MyResourceGroup"
Get-AzVpnClientConnectionHealth -InputObject $gateway

NOTES

This cmdlet requires the Azure PowerShell module to be installed and connected to your Azure subscription.

The output of this cmdlet can be used to identify active connections, their status, and potentially error details if a connection is not healthy.