Need a report For each Vnet and region: How many IP's we are using and how many we have available in Azure

santhi g 20 Reputation points
2023-02-10T13:19:57.2433333+00:00

how to fetch list of available IPs in the Azure subnet using azure cli or Powershell commands

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
{count} votes

Answer accepted by question author
  1. msrini-MSFT 9,296 Reputation points Microsoft Employee
    2023-02-10T19:47:13.47+00:00

    Hi,

    You will need to get all VNETs to a variable and do a for each loop and iterate the below command to get the connected devices in each subnet

    $result=Get-AzVirtualNetwork -Name 'xxxx'  -ResourceGroupName 'xxxx' -ExpandResource 'subnets/ipConfigurations'   
      
    $count = $result.Subnets[0].IpConfigurations  
    $count.Count
    
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.