Skip to content

Instantly share code, notes, and snippets.

@dmc-at-work
Last active August 20, 2019 08:24
Show Gist options
  • Save dmc-at-work/4403ee4252a456066b3861824d25fb84 to your computer and use it in GitHub Desktop.
Save dmc-at-work/4403ee4252a456066b3861824d25fb84 to your computer and use it in GitHub Desktop.
Azure | List | Subscription(s) + VNet(s) + Subnet(s)
$Subs = Get-AzureRmSubscription
foreach ($Sub in $Subs) {
$SelectSub = Select-AzureRmSubscription -SubscriptionName $Sub.Name
$VNETs = Get-AzureRmVirtualNetwork
foreach ($VNET in $VNETs) {
#$Sub.Name
#$VNET.Name
#$VNET.AddressSpace.AddressPrefixes
Write-Host "$($Sub.Name),$($VNET.Name),$($VNET.AddressSpace.AddressPrefixes)"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment