Discussion Locked

Scripts

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Can anyone tell me if there's a script or a batch command that will allow me to dump IP config information to a text file?

Thanks for any info.

Dennis Jones

2 replies

by blackcurrant

Hi

Click Start>Run and type:

cmd

in the Open field, then press enter. Next, type:

ipconfig /all > ip.txt

and press enter. This will pass the results of the ipconfig /all command to a text file named ip.txt (which will be automatically created when you run the command).

You can use the > symbol to pass results from any program to any file or you can use the >> symbol to append the results to a file.

Good luck

by airhockeyninja

Hi Dennis,

If you are looking to do this on one machine the suggested answer will certainly work, if you are wanting to do this on multiple machines, you can have them all dump this info into a single file on a network share like this:
1. Create the Network share on the desired mavhine (we'll use "\\server\share" in this example). Make sure that all machines you are going to run this script on have read/write permissions for the share.
2. Create the following in a text file and then rename the file to "ip.bat"
@ECHO OFF
SET IPLog="\\server\share\NetworkIPs.txt"
echo %computername%>>%IPLog%
date /T>>%IPLog%
time /T>>%IPLog%
ipconfig/all>>%IPLog%
3. Run this batch file on each machine, and you will have a log in the shared directory that will look like this:

JGLESSNER_DELL
Thu 12/23/2004
08:11 AM

Windows IP Configuration

Host Name . . . . . . . . . . . . : jglessner_dell
Primary Dns Suffix . . . . . . . : tapeware.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : tapeware.com

Ethernet adapter VMware Network Adapter VMnet8:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet8
Physical Address. . . . . . . . . : 00-50-56-C0-00-08
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.107.1
(this is truncated for brevity)

You might ask why the machine name is listed twice. This is for quick reference in the log. Hope this helps. If you have any questions, you can reach me at jglessner@gmail.com

This discussion is closed to new replies.