Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
; Search for all users with an email address. sAdsiPath = "LDAP://shamrock/dc=jclass,dc=org" sFilter = " (&(&(objectClass=user)(objectCategory=person))(mail=*))" lUsers = dsFindPath(sAdsiPath, sFilter) ; Report nCount = ItemCount(lUsers, @TAB) For i = 1 To nCount ; Get the samAccountName and Email address. sPath = ItemExtract( i, lUsers, @TAB ) sUserName = dsGetProperty(sPath, "samAccountName") sEmailAddr = dsGetProperty(sPath, "mail") sResult = StrCat("User Name: ", sUserName, @CRLF, "Email Address: ", sEmailAddr, @CRLF) Message(sPath, sResult) Next
Article ID: W16814
File Created: 2007:07:03:14:26:22
Last Updated: 2007:07:03:14:26:22