This is what I use to retrieve all computers in a domain. Maybe this will help you.

Code:
$Domain = GetObject("WinNT://" + @DOMAIN)
For Each $Obj IN $Domain
IF $Obj.class = "Computer"
? $Obj.name
ENDIF
NEXT