If you wish to create a CSV ( Comma Seperated Value) file that contains Computer Name, IP Address, and MAC Address similar to:

JSI001, 23.15.1.10, 00-10-AC-30-1E-34
JSI002, 23.15.1.20, 00-10-AC-31-84-06
JSI003, 23.15.1.30, 00-10-AC-27-34-18

you can use the IPCONFIG /ALL command. The ouput of this command provides the following information:


Windows NT IP Configuration

        Host Name . . . . . . . . . : JSI001.JSI
        DNS Servers . . . . . . . . :
        Node Type . . . . . . . . . : Mixed
        NetBIOS Scope ID. . . . . . :
        IP Routing Enabled. . . . . : No
        WINS Proxy Enabled. . . . . : No
        NetBIOS Resolution Uses DNS : No

Ethernet adapter Elnk31:

        Description . . . . . . . . : ELNK3 Ethernet Adapter.
        Physical Address. . . . . . : 00-10-AC-30-1E-34
        DHCP Enabled. . . . . . . . : No
        IP Address. . . . . . . . . : 23.15.1.10
        Subnet Mask . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . : 23.15.1.10

Ethernet adapter NdisWan4:

        Description . . . . . . . . : NdisWan Adapter
        Physical Address. . . . . . : 00-00-00-00-00-00
        DHCP Enabled. . . . . . . . : No
        IP Address. . . . . . . . . : 0.0.0.0
        Subnet Mask . . . . . . . . : 0.0.0.0
        Default Gateway . . . . . . :
        Primary WINS Server . . . . : 23.15.1.10
The IPCONFIG /ALL command must run locally. If you pipe the output to a consistent location on each computer, you can retrieve, parse, and combine it.

There are a number of ways to accomplishing this, including scheduling the IPCONFIG /ALL command, placing it in a logon script, or including it in AUTOEXNT.BAT. I use the later method and pipe the output to C:\Admin\IPConfig.log on each server and workstation in my domain.

When I want an updated CSV, I run JSIipMAC.bat which has 3 required parameters:

1. The full path of the CSV file you want generated.

2. The full path to a file that contains computer names in my domain. See tip 677.

3. The ShareName\\[folder\]\IPConfig.log on each computer.

Examples:

JSIipMAC ":\folder1\JSIipMAC.CSV" ":\folder2\JSI Domain Members.DAT" "AdminShare\IPConfig.log"

JSIipMAC C:\folder1\JSIipMAC.CSV "\\Server\Share\JSI Domain Members.DAT" "C$\Admin\IPConfig.log"

Note: The quotes are only needed if the path has spaces.

JSIipMAC.bat contains: