Hi @Nana Poku,
I understand that you require all virtual networks that are peered within the tenant.
$vnets = Get-AzVirtualNetwork
foreach ($vnet in $vnets) {
Write-Host "VNet Name: $($vnet.Name)"
if ($vnet.VirtualNetworkPeerings.Count -gt 0) {
foreach ($peering in $vnet.VirtualNetworkPeerings) {
Write-Host "Peered with: $($peering.RemoteVirtualNetwork.Id)"
}
} else {
Write-Host "No peerings found."
}
}
I hope it helps.
If above is unclear and/or you are unsure about something add a comment below.
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.