# Export Management Group hierarchy + all resources under it az account management-group list --output json > mg-hierarchy.json az graph query -q "Resources | project id, name, type, location, resourceGroup, subscriptionId, properties, sku, kind, tags" --management-groups "<MG-NAME>" --first 1000 -o json > azure-inventory.json
# Export Management Group hierarchy + all resources
$mg = Get-AzManagementGroup -GroupName "<MG-NAME>" -Expand -Recurse
$subs = Get-AzManagementGroupSubscription -GroupName "<MG-NAME>"
$resources = @()
foreach ($sub in $subs) {
Set-AzContext -SubscriptionId $sub.Id.Split('/')[-1]
$resources += Get-AzResource
}
@{ managementGroups = $mg; subscriptions = $subs; resources = $resources } | ConvertTo-Json -Depth 15 | Out-File azure-inventory.json
# Export all resources in a specific subscription az account set --subscription "<SUBSCRIPTION-NAME-OR-ID>" az resource list --output json > azure-inventory.json
az graph query -q "Resources | project id, name, type, location, resourceGroup, subscriptionId, properties, sku, kind, tags" --subscriptions "<SUBSCRIPTION-ID>" --first 1000 -o json > azure-inventory.json
# Export all resources in a subscription Set-AzContext -SubscriptionName "<SUBSCRIPTION-NAME>" Get-AzResource | ConvertTo-Json -Depth 10 | Out-File azure-inventory.json
# Export all resources in a specific Resource Group az resource list --resource-group "<RG-NAME>" --output json > azure-inventory.json
# Export all resources in a Resource Group Get-AzResource -ResourceGroupName "<RG-NAME>" | ConvertTo-Json -Depth 10 | Out-File azure-inventory.json
Choose a pre-built architecture template to quick-start your diagram. This will replace the current diagram.
| Delete / Backspace | Delete selected element |
| Escape | Deselect / Close modal |
| Arrow Keys | Nudge selected element |
| + / = | Zoom in |
| - | Zoom out |
| Ctrl/โ + 0 | Fit to screen |
| Ctrl/โ + Z | Undo |
| Ctrl/โ + Y | Redo |
| ? | Show this help panel |