• Very good article.

    I have wrote a batche file to create one csv file for all servers by using dsquery in conjunction with sysinfo.

    However, there is a bug with sysinfo with XP SP3. If running sysinfo with the csv output enabled, from an XP SP3 computer, then copy sysinfo.exe from a server (W2K3 server for example).

    example batch file - You will need to change the dsquery line to match the ou and domain that your servers are in. The csv file created is in c:\serverresults.csv:

    @echo off

    SET MYCOUNT = 0

    dsquery computer ou=Servers,dc=MyDomain,dc=com > %TEMP%\Serverlist.txt

    IF EXIST c:\serverresults.csv DEL c:\serverresults.csv

    FOR /F "tokens=2 delims==," %%i in (%TEMP%\serverlist.txt) do call :GETINFO %%i

    GOTO :FINISH

    :GETINFO

    SET SERVERNAME=%1

    SET /A MYCOUNT=%MYCOUNT% + 1

    IF "%MYCOUNT%" == "1" (

    systeminfo /s %SERVERNAME% /FO CSV >> c:\serverresults.csv

    ) ELSE (

    systeminfo /s %SERVERNAME% /FO CSV /NH >> c:\serverresults.csv

    )

    GOTO :EOF

    :FINISH