Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: List Users Organisational Unit OU AD Active directory
Any help would be appreciated.
ou_path="LDAP://server.com/OU=yourOU,DC=server,DC=com" ;the path to the OU you want to search users_in_OU=dsfindpath(ou_to_search,"(&(objectcategory=Person)(objectclass=user))")users_in_OU will contain a tab delimited list of the paths to all users within the ou so you may want to loop through the list and get whatever properties you want about the user (i.e. name, email, etc)
You can also use the "dsGetChldPath" function. It would look something like this:
lUserPaths = dsGetChldPath(OuPath, "user")where the second parameter is the class of object you wish to get paths for.
Article ID: W15817
File Created: 2008:07:17:08:09:10
Last Updated: 2008:07:17:08:09:10