====== Azure Resource Graph VNet Query ====== **User:** Resources | where type =~ 'microsoft.network/virtualnetworks' | extend vnetAddressPrefixes = properties.addressSpace.addressPrefixes | project subscriptionId, resourceGroup, vnetName = name, vnetAddressSpace = tostring(vnetAddressPrefixes), location | order by subscriptionId, resourceGroup --- need only for vnet1, vnet2 the ip address spaces **Assistant:** You can filter the results to only the VNets `vnet1` and `vnet2` by adding a `where` clause for the VNet names: ```kusto Resources | where type =~ 'microsoft.network/virtualnetworks' | where name in~ ('vnet1', 'vnet2') | extend vnetAddressPrefixes = properties.addressSpace.addressPrefixes | project vnetName = name, vnetAddressSpace = tostring(vnetAddressPrefixes) | order by vnetName ====== View ExpressRoute Connections and Routing ====== User: need to view all my express routes connection, and rotuing configuration on the gateway Assistant: To view ExpressRoute resources and routing config: === ExpressRoute Gateways === kusto Copy code Resources | where type =~ "microsoft.network/virtualnetworkgateways" | where properties.gatewayType =~ "ExpressRoute" | project subscriptionId, resourceGroup, gatewayName = name, location, sku = properties.sku.name, enableBgp = properties.enableBgp, bgpSettings = properties.bgpSettings === ExpressRoute Connections === kusto Copy code Resources | where type =~ "microsoft.network/connections" | where properties.connectionType =~ "ExpressRoute" | extend peeringId = properties.peer.id | project subscriptionId, resourceGroup, connectionName = name, expressRouteCircuit = tostring(peeringId), connectionStatus = properties.connectionStatus, routingWeight = properties.routingWeight, enableBgp = properties.enableBgp === Routing Configuration === kusto Copy code Resources | where type =~ "microsoft.network/virtualnetworkgateways" | where properties.gatewayType =~ "ExpressRoute" | extend bgp = properties.bgpSettings | project subscriptionId, resourceGroup, gatewayName = name, asn = tostring(bgp.asn), bgpPeeringAddress = tostring(bgp.bgpPeeringAddress), peerWeight = tostring(bgp.peerWeight) ====== Routes Visibility ====== User: is it possible to see also the routes Assistant: Short answer: No — full routing tables (effective routes) cannot be queried via Azure Resource Graph. But you can see routes via CLI / PowerShell: === Learned Routes (ExpressRoute Gateway) === bash Copy code az network vnet-gateway list-learned-routes \ --name \ --resource-group === Advertised Routes to On-Prem === bash Copy code az network vnet-gateway list-advertised-routes \ --name \ --resource-group \ --peer === Effective Routes for VM NIC === bash Copy code az network nic show-effective-route-table \ --name \ --resource-group Azure Portal also shows effective routes. ====== User Request ====== User: give me the wholy communication in a dokuwiki format ready for copy and paste Assistant: (Provided the full DokuWiki formatted content)