Use fnADQuery() to search for your results.

Here is an example...

Code:

$aWhat = "Name", "AdsPath", "distinguishedName"
$sFrom = "LDAP://"+GetObject("LDAP://rootDSE").Get("defaultNamingContext")
$sWhere = "objectClass = 'User'"

$ticks = @TICKS
$aResults = fnADQuery($aWhat,$sFrom,$sWhere,,2)
@ERROR " | " @SERROR ?

For Each $Result in $aResults
If VarType($Result)>8192
For Each $R in $Result
$R ?
Next
Else
$Result ?
EndIf
Next

? "The query returned " + (UBound($aResults)+1) + " results in " + ((@TICKS-$ticks)/1000) + " seconds." ?



Edited by Chris S. (2005-05-09 11:00 PM)