ADSI scripting template that runs the script against three computers whose names have been hard-coded into the script itself (in an array variable named arrComputers).

Visual Basic
Edit|Remove
On Error Resume Next

arrComputers = Array("atl-ws-01","atl-ws-02","atl-ws-03")

For Each strComputer in arrComputers

    ' =====================================================================
    ' Insert your code here
    ' =====================================================================

    Set objComputer = GetObject("WinNT://" & strComputer & "")
    objComputer.Filter = Array("User")
    For Each objUser in objComputer
        Wscript.Echo objUser.Name
    Next

    ' =====================================================================
    ' End
    ' =====================================================================

Next