The problem is that vartype for pwdLastSet is "object". This is why you have iDispatch error.
I have made some changes in your code to test :
 Code:
break on
 
$aData = GetLastPwdSetList(
	"LDAP://CN=TestUsers,CN=Users,DC=xxx,DC=xxx",	; from where
	"&(objectClass=User)"				; filter
)
@SERROR ?
(UBound($aData,1)+1) ' elements' ?
for $i=0 to UBound( $aData,1 )
    $objUser = GetObject( "LDAP://"+$aData[$i,0] )
    $objUser.GetInfo()

    $objUser.distinguishedname+chr(9)+
    $objUser.displayname+chr(9)+
    $objUser.PasswordLastChanged ?
Next
 
Function GetLastPwdSetList($sFrom, $sFilter)
	Dim $sWhat, $sScope, $Request
 
	$sWhat = "distinguishedname"
	$sScope = "SubTree"
	$Request = fnLDAPQuery($sWhat, $sFrom, "("+$sFilter+")", , $sScope)
	if @error	exit @error	endif
 
	$GetLastPwdSetList=$Request
	Exit 0
EndFunction

In the function, i request for distinguishedName property (not pwdLastSet).
Then, with the distinguishedName, i create an object and i read properties.
Finally, i display distinguishedname, displayname and pwdLastSet.

I think this is what you tried to do.
_________________________
Christophe