VBScript, seperating the output of an echo to columns
Posted on 2004-10-29
Ok.. so I got some help earlier that proved right on, but hadn't forseen the result...
The following script enumerates all the users in the specified OU and echos them to a single message box as a long list. The problem is if the list is longer than the screen, it just doesn't show the rest of the list. I need a way for the output (wscript.echo) to be split into columns of 30 lines max or to make the message box scrollable.
Set objOU = GetObject("LDAP://" & UserOUPath)
i = 0
objOU.Filter = Array("user")
For Each objUser In objOU
UsersInOU(i) = objUser.Name
i = i + 1
X = i
Dim strTemp : strTemp = ""
For Y = 0 To X
strTemp = strTemp & Y & " - " & mid(UsersInOu(Y),4,30) & Vbcr
Thanks in advance!