Thank you for your help!

This also works well. Why do you say this operation(option two) is slower--and how can we reliably test that assertion? It was my thought that option two would be faster, as there are less operations. Please clarify.

Again, thank you for your help-- just what I was looking for.


code:

Call enumComps

For Each $Item in $MyArray
?$Item
Next

Function enumComps()
Global $MyArray[]
$objADsPath = GetObject("LDAP://CN=,OU=,DC=,DC=")
For Each $obj in $objADsPath.Members
If $obj.Class = "computer"
ReDim Preserve $MyArray[UBound($MyArray)+1]
$MyArray[UBound($MyArray)] = $obj.cn
EndIf
Next


Edited by werealldevo (2007-10-12 05:08 PM)