I know how to find the IP address of a computer, but how to make the variable set as the IP address of this computer or save it in a text file, is everything in the package?
In addition, I found a line of code on the Internet that would ping every possible IP address of this server and list the IP addresses successfully ping, but this did not work; they all timed. What would be wrong? Is there a better way to do this? So here is the code for this:
FOR /L %i IN (1,1,254) DO ping --a --n 1 10.0.1.%i | FIND /I "Reply">> c:\lanipaddresses.txt
Thank!
source
share