Last active
August 20, 2019 08:24
-
-
Save dmc-at-work/4403ee4252a456066b3861824d25fb84 to your computer and use it in GitHub Desktop.
Azure | List | Subscription(s) + VNet(s) + Subnet(s)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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