NicInfo returns an Array of Arrays.. takes a bit of getting used to. Here's what I put together as an exercise

It outputs a CSV file directly readable by Excel or other applications. I used a single output file - the first field is the hostname,
second is the NIC Index, and remaining fields are the data from NicInfo.

When an error occurs, Field 2 is "ERROR", followed by the error code and error message in fields 3 & 4.

Only the base code is shown - it uses Ping(), NicInfo(), FileIO(), and CSV() UDFs. You will need the latest version of CSV - available after 8pm today on my web site.


Break On
 
Dim $			; temp var 
Dim $Host		; name of host we're processing 
Dim $aNicInfo		; array of NIC data read from host 
Dim $aHostList		; array of hostnames read from file 
Dim $aOutput		; array of output data 
Dim $I, $O		; Index pointers 
Dim $Record		; CSV format record 
 
$ = SetOption('WrapAtEOL', 'On')
 
$O = -1
 
$aHostList = FileIO('c:\temp\pclist.txt', 'R')
If @ERROR @SERROR ? Exit @ERROR EndIf
For Each $Host in $aHostList
  If $Host						; ignore blank lines 
    If Ping($Host)
      $aNICInfo = NicInfo($Host)
      If @ERROR
        $Record = $Host, 'ERROR', @ERROR, @SERROR	; as array 
        $Record = Csv($Record, 1)			; to CSV 
      Else
        For $I = 0 to UBound($aNicInfo)
          $Record = Join($aNicInfo[$I], Chr(30))
          $Record = $Host + Chr(30) + $I + Chr(30) + $Record
          $Record = Csv(Split($Record, Chr(30)))	; convert to CSV format 
        Next
      EndIf
    Else
      $Record = $Host, 'ERROR', @ERROR, 'Unresponsive'	; as array 
      $Record = Csv($Record, 1)				; to CSV 
    EndIf
    $O = $O + 1						; next output record 
    ReDim Preserve $aOutput[$O]				; increase array size 
    $aOutput[$O] = $Record
  EndIf
Next
 
; write the output file 
If Not FileIO('c:\temp\ipinfo.csv', 'W', $aOutput)
  'Write file: ' @SERROR @CRLF
Else
  'Completed successfully!' @CRLF
EndIf
 
_________________________
Actually I am a Rocket Scientist! \:D