Software >> OS >> Windows >> API >> ADSI >>  How to list the OUs under a given active directory container

assume target container is LDAP://DC=somecollege,DC=edu To list OUs under it using vbscript :- Set oOUs = GetObject ("LDAP://DC=somecollege,DC=edu") oOUs.Filter = Array("organizationalUnit") For each oOU in oOUs wscript.echo oOU.Name Wscript.echo oOU.Class Next