WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Samples from Users

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

List ADSI Paths of Groups and their Members

 Keywords: List ADSI Path Groups Member dsGetProperty dsFindPath dsGetMemGrp

AddExtender("wwads44i.dll")
ServerDn=dsGetProperty("LDAP://rootDSE", "serverName")
ServerName=ItemExtract(1, ServerDn, ",")
ServerName=ItemExtract(2, ServerName, "=")
ServerDn=dsGetProperty("LDAP://rootDSE", "defaultNamingContext")
ServerPath="LDAP://%ServerName%/%ServerDN%"
Grouplist = dsFindPath (ServerPath, "(& (objectClass=Group))")
sGroupPath = AskItemlist('Group list', Grouplist, @TAB, @UNSORTED, @SINGLE )

;Display all member paths.
members = dsGetMemGrp(sGroupPath)
AskItemlist('Members of ': sGroupPath, members, @TAB, @UNSORTED, @SINGLE )
Exit

Article ID:   W17549
Filename:   List ADSI Paths of Groups and their Members.txt
File Created: 2010:09:01:10:28:30
Last Updated: 2010:09:01:10:28:30