I'm trying to fill an array with members from an AD group. I keep getting the following error while trying to set newArray(count) to the user name.
Microsoft VBScript runtime error: Subscript out of range
Here is the relevant code:
'set up of domain variables and stuff, verified working
Dim newArray()
Dim x
x = 0
Do While x < 1
Set objGroup = GetObject("WinNT://" & strDomain & "/" & strGroup & ",group")
count = 0
For Each objUser In objGroup.Members
newArray(count) = objUser.FullName
count = count + 1
Next
....