title: Number of avaliable ips in azure subnet
body: <p>I am looking for number of available IP addresses in each subnet in azure vnet
  so I am trying below script but I am not getting any option to get available IP.</p>
  
  <pre><code>$nic = Get-AzureRmVirtualNetwork -Name TST-VNET1 -ResourceGroupName TST-RG1
  $nic.AddressSpace.AddressPrefixes
  $subnets= $nic.Subnets
  $subnets
  foreach( $subnet in $subnets)
  {
  $subnet.Name
  $subnet.IpConfigurations.Count
  $subnet.AddressPrefix
  }
  </code></pre>
  
  <p>Using <code>$subnet.IpConfigurations.Count</code> gets the usable IP addresses. <code>$subnet.AddressPrefix</code> gets the cidr. </p>
  
  <p>I am looking here available or assigned host IP addresses in each subnet pool.</p>