List of Server names and their IPs from N/W

December 15, 2010 at 05:56:32
Specs: Windows XP
I want the code to pull the list of Server host names and their respective IPs from the Network and save it in txt or Doc file.

And also please give me the details of how to use that batch file and where.


Thanks,
Jk


See More: List of Server names and their IPs from N/W

Report •

#1
December 15, 2010 at 15:13:19
Browse your "Network Places".

OR:

Start -> Run -> CMD (hit enter)

CMD:
net view

Ping each device\node\system\target for the IP.

DO NOT PING THE FULL DEVICE FULL NAME:

Ping without the "\\"

Example:

C:\net view

\\DEVICE01
\\DEVICE02
\\PRINTER

WRONG:
ping \\DEVICE01

GOOD:
ping DEVICE01

Ping results should appear now etc.. and you should see the IP address of the device.

Regards,

Happy is ONE who says I am an OttoMAN.


Report •

#2
December 16, 2010 at 01:56:58
Hi ,

Thanks for replying but i willl have to do that manually which is not possible because there are thousand of servers. I had gone through some of the posts where i got one code which when executed gives the host name and IP of that particular pc where it is executed. I will paste it here....

@echo off
ipconfig /all > tempIP.txt
for /F "tokens=2 delims=:" %%j in ('ipconfig /all ^| find "Host Name"') do set Host=%%j
set Host=%Host:~1%
ren tempIP.txt "%Host%.txt"
:: End_Of_Batch

--------So in the same way i want some code if i execute it in my desktop it should gather all the info about the network and save it in txt or doc file.

thanks
Jk


Report •
Related Solutions


Ask Question