'************************************************** ' ' This script enumerates the group's membership. ' To run: cscript member_adam.vbs ADsPath GroupName ' Examples: cscript member_adam.vbs LDAP://localhost:389/ou=testou,c=us ' '************************************************** set Args = Wscript.Arguments ouName = Args(0) ' If the application OU DN is "ou=adamou,c=us" and the server is "adamhost" and the port is 389. Then the parameter ouName should be passed ' as follows: "LDAP://adamhost:389/ou=adamou,c=us" set ou = GetObject(ouName ) wscript.echo "Displaying Groups and Group membership..." & vbcrlf ou.Filter = Array("group") for each obj in ou wscript.echo "Group : " & obj.Name for each member in obj.Members wscript.echo " |" wscript.echo " -- " & member.Name Next wscript.echo vbcrlf Next