This works for me.
All you need to do is change the usernames in the $usernames array.
Also have a look at Basic Scripting » LDAP Query Again. The script below is taken from what Kdyer (aka Kent) posted there.

 Code:
Break on

$usernames = "User1", "User2", "User3"

For Each $username in $usernames
	$userhome = TranslateName(3, "", 3, @LDomain + "\" + $username, 1)
	$userinfo = GetObject("LDAP://" + $userhome[0])
	? "Display Name: " + $userinfo.displayName
Next

? 'Press a key...'
Get $

;========== DO NOT MODIFY ANYTHING BELOW THIS LINE
;========== THIS IS A UDF AND IT COMES READY FOR USE
;
; TranslateName function authored by Howard A. Bullock
Function TranslateName($InitType, $BindName, $LookupNameType, $LookupName, $ReturnNameType)
	Dim $InitType, $BindName, $LookupNameType, $LookupName, $ReturnNameType
	Dim $NameTranslate, $ReturnName, $Error, $ErrorText
	$Error = 0
	$ErrorText = ""
	$ReturnName = ""
	$NameTranslate = CreateObject("NameTranslate")
	$Error = @error
	$ErrorText = @serror
	If $Error = 0
		$NameTranslate.Init($InitType, $BindName)
		$Error = @error
		$ErrorText = @serror
		If $Error = 0
			$NameTranslate.Set($LookupNameType, $LookupName)
			$Error = @error
			$ErrorText = @serror
			If $Error = 0
				$ReturnName = $NameTranslate.Get($ReturnNameType)
				$Error = @error
				$ErrorText = @serror
			EndIf
		EndIf
	EndIf
	$TranslateName = $ReturnName, $Error, $ErrorText
EndFunction
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.