Sorry... I'm at my end... but I'd be willing to bet Chris S's fnLDAPQuery() - http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=142043&page=1#Post142043 will do what you want. Maybe Chris will check in soon and give you some guidance... or maybe try messing with his example

 Code:
Dim $aAttributes,$sADsPath,$strFilter
Dim $aResults,$c,$r
 
$aAttributes = "mail","telephoneNumber","msExchHomeServerName"
$sADsPath = "LDAP://"+GetObject("LDAP://rootDSE").Get("defaultNamingContext")
$strFilter = "(&(objectCategory=person)(objectClass=user)(SAMAccountname="+@UserID+"))"
 
$aResults = fnLDAPQuery($aAttributes,$sADsPath,$strFilter)
 
For Each $r in $aResults
    If InStr($r,"=")
        Split($r,"=")[Ubound(Split($r,"="))]
    Else
        $r ?
    EndIf
Next