Hi Dana,

I see what your doing here - but the problem, me thinks, is that one can't create a dynamic array using a $variable, the way to make this work is to use the Execute() function. Here's an example using the top part of your script:

break on

; Set initially to string

$ElementArray=""

; Enumerate hostnames in the domain

$cont = getobject("WinNT://" + @domain + ",domain")
$cont.filter = "computer",""
for each $machine in $cont
$obj = $machine.name
        $ElementArray=$ElementArray + ", "+$obj ; append to string, comma-delimed
next

; Morph the comma-delimed string into an array ...

$=execute('$$ElementArray = split($$ElementArray,",")')

;******************

; Enumerate the array ...

For Each $Element In $ElementArray ;Test to see array
  ? "Element=" $Element
Next



The other way is to create (DIM) a real array, then populate and dynamically REDIM PRESERVE along the way. Hope this helps.

-Shawn