Deletes an Active Directory subnet.
strSubnetCN = "cn=192.168.1.0/26"Set objRootDSE = GetObject("LDAP://RootDSE")strConfigurationNC = objRootDSE.Get("configurationNamingContext")strSubnetsContainer = "LDAP://cn=Subnets,cn=Sites," & strConfigurationNCSet objSubnetsContainer = GetObject(strSubnetsContainer)objSubnetsContainer.Delete "subnet", strSubnetCN
This is a VB Script, this can be used by saving the file in .vbs file