Creates an Active Directory subnet.
strSubnetRDN = "cn=192.168.1.0/26"strSiteObjectRDN = "cn=Ga-Atl-Sales"strDescription = "192.168.1.0/255.255.255.192"strLocation = "USA/GA/Atlanta"Set objRootDSE = GetObject("LDAP://RootDSE")strConfigurationNC = objRootDSE.Get("configurationNamingContext")strSiteObjectDN = strSiteObjectRDN & ",cn=Sites," & strConfigurationNCstrSubnetsContainer = "LDAP://cn=Subnets,cn=Sites," & strConfigurationNCSet objSubnetsContainer = GetObject(strSubnetsContainer)Set objSubnet = objSubnetsContainer.Create("subnet", strSubnetRDN)objSubnet.Put "siteObject", strSiteObjectDNobjSubnet.Put "description", strDescriptionobjSubnet.Put "location", strLocationobjSubnet.SetInfo
This is a VB Script, this can be used by saving the file in .vbs file