Ok, I'm using fnADQuery() and have gotten to function to work using this:

Code:
$aWhat		= "Name", "ADSPath"
$sFrom = "LDAP://OU=IT,DC=microsoft,DC=com"
$sWhere = "objectClass = 'Computer' AND Name = 'C*'"
$sOrderBy = "Order By Name"

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

$numResults = ubound($aResults)
? $numResults

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

Sleep 5



Now the UDF states that to query for an extra attribute, all you have to do is add it to the $WHAT variable. I tried adding "lastlogontimestamp" but it returned an error. The exmaple value "Name" pulls up the computer name and the other example value "ADSPath" brings up the distinguished name. Is there a listing somewhere I can look at to know what word will give me lastlogontimestamp???


Edited by thepip3r (2005-05-26 05:24 PM)