To verify whether the VNet-to-VNet connection is successfully set up, you have to go through 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 shows Connected, then the connection is successful:
Verify the connection
In this demo, we verified the VNet-to-VNet connection. In the next section, we will look at the differences between VNet peering and VNet-to-VNet connections.