Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: arrays exchange adsi
User="TEST1" (0) VALUE=> "TEST1" Div="TEST" (0) VALUE=> "TEST" ADsPath="LDAP://OCAREX2/cn=TEST1,cn=TEST,cn=Recipients,ou=OCAR,o=ORGANIZATION" (0) VALUE=> "LDAP://OCAREX2/cn=TEST1,cn=TEST,cn=Recipients,ou=OCAR,o=ORGANIZATION" adsUser=ObjectAccess(ADsPath,0) (297) VALUE=> 33333 Members=adsUser.memberOf (422) VALUE=> "cn=OCAR TEST,cn=Mailing Lists,cn=Recipients,ou=OCAR,o=ORGANIZATION"However, if the mailbox belongs to more than one list (ie membersOf becomes multivalued) the script fails:
User="TEST1" (0) VALUE=> "TEST1" Div="TEST" (0) VALUE=> "TEST" ADsPath="LDAP://OCAREX2/cn=TEST1,cn=TEST,cn=Recipients,ou=OCAR,o=ORGANIZATION" (0) VALUE=> "LDAP://OCAREX2/cn=TEST1,cn=TEST,cn=Recipients,ou=OCAR,o=ORGANIZATION" adsUser=ObjectAccess(ADsPath,0) (312) VALUE=> 33333 Members=adsUser.memberOf (1359) VALUE=> 0 TERMINAL WIL ERROR=>1249 (Ole Object: Could not process value returned from object)Gotta be something simple, right? What's the syntax I need?
You might consider using the Beta ADSI extender to handle this....
AddExtender("wwads34I.dll") ; Set credentials. dsSetCredent("bill", "Guesswho") ; User. sUserPath = "LDAP://win2000/cn=Homer Simpson,cn=users, DC=win2000,DC=windowware,DC=com" ;Group specified with common name. sGroupPath = “LDAP://win2000/cn=Toon,DC=win2000,DC=windowware,DC=com" ; Check for group membership. if dsIsMemberGrp( sGroupPath, sUserPath) then sResult = "Is a toon" else sResult = "Is not a Toon." message(sUserPath, sResult)Unfortunately this requires that the MS ADSI support files be installed on any NT4 box.
Article ID: W14670
Filename: Getting multivalued properties and Arrays.txt
File Created: 2001:03:01:13:20:22
Last Updated: 2001:03:01:13:20:22