WMI 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 objWMIService = GetObject _
        ("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colItems = objWMIService.ExecQuery _
        ("Select * From Win32_OperatingSystem")
    For Each objItem in ColItems
        Wscript.Echo strComputer & ": " & objItem.Caption
    Next

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

Next