Afficher un message
Vieux 04/10/2007, 11h23   #1
Bobby
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Can't get simple LDAP script to work

Hi
I'm new to LDAP. I'm trying to use the script below (copied from
Technet) to list all of the members in an AD group. I'm struggling
with this, and wondered if anybody could me out. The script is:

On Error Resume Next

Set objGroup = GetObject _
("LDAP://cn=Scientists,ou=R&D,dc=NA,dc=fabrikam,dc=com")
objGroup.GetInfo

arrMemberOf = objGroup.GetEx("member")

WScript.Echo "Members:"
For Each strMember in arrMemberOf
WScript.echo strMember
Next

My group is called "Accounts", which is under a folder called
"Company" in Active Directory and users. The domain name is mycompany-
uk.com. The best I can come up with is:

Set objGroup = GetObject _
("LDAP://cn=Accounts,ou=Company,dc=mycompany-uk,dc=com")

Unfortunately this doesn't work. What am I doing wrong?

Sorry if this is a daft question. Thanks for any ,

Colin

  Réponse avec citation
 
Page generated in 0,05997 seconds with 9 queries