script for Finding IP & Computer NAme together

  • Thread starter Thread starter muuvv
  • Start date Start date
M

muuvv

DO anyone know of a way To Find the IP ANd Username of A Set of PCs on a
Windows 2000 Network Using Static IP. If possible using built-in Windows
Commands instead of 3rd Party Software would be Best.

I need to Get the Following Info, Kind of like the "Net
view" Command and "Ping " command Combined. All I want is a List of all the
PCs on the Network and their IP address. So I can Pipe This to A File and
print it out Daily. The Ping -a Gives the machine name but it also
Give a lot of other Stuff I can't use. I can write a Script or batch File
To Scan All the IPs I need (Which is only about 60 Address) I would love to
be able to get the Following Only..
example
IP address PC/system Name
------------- --------------
xxx.xxx.xxx.001 machine01
xxx.xxx.xxx.002 machine02

or if there is a simple 3rd party software that can do this
please advise.. BTW if it don't make sense to need this it's job related...

and if possible send a reply to
(e-mail address removed)

Thanks
Muuvv
 
muuvv said:
DO anyone know of a way To Find the IP ANd Username of A Set of PCs on a
Windows 2000 Network Using Static IP. If possible using built-in Windows
Commands instead of 3rd Party Software would be Best.

I need to Get the Following Info, Kind of like the "Net
view" Command and "Ping " command Combined. All I want is a List of all the
PCs on the Network and their IP address. So I can Pipe This to A File and
print it out Daily. The Ping -a Gives the machine name but it also
Give a lot of other Stuff I can't use. I can write a Script or batch File
To Scan All the IPs I need (Which is only about 60 Address) I would love to
be able to get the Following Only..
example
IP address PC/system Name
------------- --------------
xxx.xxx.xxx.001 machine01
xxx.xxx.xxx.002 machine02

or if there is a simple 3rd party software that can do this
please advise.. BTW if it don't make sense to need this it's job related...

and if possible send a reply to
(e-mail address removed)

Thanks
Muuvv

You could try something like this as a starting point:

Line1 @echo off
Line2 echo IP Address NetBIOS Name
Line3 echo ============================
Line4 for /F %%a in ('net view ^| find "\\"') do call :Sub %%a
Line5 goto :eof
Line6
Line7 :Sub
Line8 set name=%1
Line9 set name=%name:~2%
Line10 for /F "tokens=3 delims=: " %%a in ('ping %name% -n 1 ^| find /i
"bytes="') do set IP=%%a
Line11 echo %name% %ip%


A family that computes together stays together. Let us compute!
 
Back
Top