IP by Hostname

April 28, 2011 at 11:58:18
Specs: Windows 7

I am trying to create batch file to get the IP of computers using "nslookup hostname" command but so far not able to find a way,
i was wondering if someone could help

See More: IP by Hostname

Report •

May 1, 2011 at 17:09:59

FOR /F "skip=4 tokens=2 delims=:" %%A IN ('2^>NUL nslookup %1') DO (
    ECHO IP Address for %1: %%A



lookup.bat computername
IP Address for computername:

When your only tool is a hammer, every problem looks like a nail.

Report •
Related Solutions

Ask Question