Summary: Use the AzureRM cmdlets to list all available virtual networks in a subscription.
I’m doing work for a client who forgot to give me a list of the virtual networks in the client’s Azure subscription. Could you save me some time and show me how to get that list?
Just use the Get-AzureRMVirtualNetwork cmdlet. This will dump the output to the screen in a long list. If you’d like something more readable, such as the name, location and the subnet that it controls, try this one liner:
Get-AzureRmVirtualNetwork | Select-Object Name, Location,@{Name='Network'; Expression={$_.AddressSpace.AddressPrefixes}}
0 comments