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

ADSI
plus

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

dsFindPath Search Request Slow

 Keywords:  

Question:

I am trying to figure out a way to add users to global e-mail distribution lists and create/add users to local distribution lists. I have the following requirements…

I need to be able to add users from a list of either account names or display names. EG. Jdoe or John Doe.

I will not have administrative privileges to the AD. I will be able to read but I can not change. I would of course have privileges to add and remove members from individual distribution lists.

I went down a very convoluted road of attempting to manipulate the actual windows within exchange and got hung up when it came to doing error checking. IE. There is no John Doe on in the AD but there is John Doorman and he got added to the list.

I’m hoping I will have an easier time directly manipulating the LDAP however I can’t figure out the first step of identifying user accounts given I have only the display name to work with.

If anyone can turn the bulb on in this darkened cavern I’m using for grey-matter repository today I would really appreciate it.

Answer:

Using display names for this is probably not a very good idea unless that's the way you have to have it. What happens when you have 2 John Smiths?

Have you tried:

display="John Doe"
user="jdoe"
path="LDAP://server.domain/dc=server,dc=domain"
;then either the good way or not
;good way
user_path=dsfindpath(path, "samaccountname=%user%")
;not a very good way
user_path=dsfindpath(path, "displayname=%display%")

Article ID:   W15381
File Created: 2003:05:13:11:27:24
Last Updated: 2003:05:13:11:27:24