Subnet used

Jayesh Dave 296 Reputation points
2021-03-17T14:37:37.547+00:00

Hello:

I have couple of subnets and i am not sure if that subnet is in used by any resources.

I want to drop\delete those 2 subnets to freeup for better use.

Can someone guide me to identify if those 2 subnets are in use before i delete them?

Any help is greatly appreciated.

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.
2,289 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andriy Bilous 11,176 Reputation points MVP
    2021-03-17T15:57:54.253+00:00

    Hello @Jayesh Dave
    In your case, you can simply try to delete subnets.
    If subnets have linked devices/resources, Azure will give an error and won't delete subnets

    You can get get detailed information about subnet IpConfigurations using Powershell

    $result=Get-AzVirtualNetwork -Name '<vnet name>'  -ResourceGroupName '<group nmae>' -ExpandResource 'subnets/ipConfigurations'   
    $result.Subnets[0].IpConfigurations  
    
    0 comments No comments

0 additional answers

Sort by: Most helpful