Verifying your virtual network's connectivity
To verify whether the VNet-to-VNet connection has been successfully set up, perform the following steps:
- In PowerShell, use the following code to verify the network connection:
Get-AzVirtualNetworkGatewayConnection -Name $Connection01 - ResourceGroupName $RG1 Get-AzVirtualNetworkGatewayConnection -Name $Connection02 - ResourceGroupName $RG2
- If the connection status is Connected, then this means the connection was successful:
In this demonstration, we verified our VNet-to-VNet connection. In the next section, we will look at the differences between VNet peering and VNet-to-VNet connections.