08 December 2021

Get all subnets in you Active Directory

 To get all subnets in your Active Directory, use this PowerShell oneliner:

[System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Sites.Subnets.Name