|
|
|||||||
Here is my question. I am trying to connect to LDAP but as the code that a member send me (Peter) did not work. Now I am stuck. Here is what I think the problem. This piede of code cannot connect to LDAP. But I don’t know why. There is no error routine in the code so I don’t know why it is not connecting. If I make a message: MessageBox("LDAP://$userOU,dc=$DomainName,dc=$Toplevel","adsDomain =",16) MessageBox("LDAP://cn=$Group,$GroupOU,dc=$DomainName,dc=$Toplevel","adsGroup =",16) The values are filled by what appears to be good. But if I make a message for the value $adsDomain or $adsGroup they are empty. Whats is it that’s going wrong. Code: ; connecting to Ldap |
||||||||
|
|
|||||||
Try checking the error values to see if it is failing or not. Since it's an object I dont think it would display anything if you tried to view $adsdomain or $adsgroup. You can view properties of the object however like... $null=messagebox($adsGroup.name,"",0) Code:
|
||||||||
|
|
|||||||
You could also use the TranslateName UDF as it will help cut down on syntax errors when needing the ldap path. You could do something like... Code: $group = "Domain Admins" ; The group you are trying to connect to |
||||||||
|
|
|||||||
@CitrixMan Yep that helped. I used the code to find my problem. (thats also a use for piece of code) and i found my problem. Thanks Everything works now. |