The Get-AzVirtualNetworkPeering cmdlet gets the virtual network peering.
Examples
Example 1: Get a peering between two virtual networks
# Get virtual network peering named myVnet1TomyVnet2 located in myVirtualNetwork in the resource group named myResourceGroup.
Get-AzVirtualNetworkPeering -Name "myVnet1TomyVnet2" -VirtualNetworkName "myVnet" -ResourceGroupName "myResourceGroup"
Example 2: Get all peerings in virtual network
# Get all virtual network peerings located in myVirtualNetwork in the resource group named myResourceGroup.
Get-AzVirtualNetworkPeering -Name "myVnet1To*" -VirtualNetworkName "myVnet" -ResourceGroupName "myResourceGroup"
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.