-2

I would like to get the IP Address Range (Starting IP, Ending IP) from a Subnet in Azure using Powershell.

Any help would be great.

Thanks, Paul

1 Answers1

0

You need to dig through the vnet XML config:

[xml]$vnetconfig = (Get-AzureVNetConfig).XMLConfiguration
$vnetsites = $vnetconfig.networkconfiguration.VirtualNetworkConfiguration.VirtualNetworkSites.VirtualNetworkSite
foreach ($site in $vnetsites) {
   foreach ($subnet in $site.subnets) {
      $subnet.subnet
   }
}