Search for MAC

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

is there a way that is built into the MS WIN2K that I can
retrieve an IP address if I only have the MAC of the
device? These IP's are reserved in DHCP, but there are
too many scopes to manually search. Thanks.
 
if you have a ping too or something that you could ping the whole network.
then do a arp -a and it should return the mac for each device you pinged.
 
I'm using Windows Server 2003. I don't know if the features I'm using are
available in Windows 2000. I find the "netsh dhcp" command useful. In your
case I'd consider "netsh dhcp server \\myserver show scope" and "netsh dhcp
server \\myserver scope 10.0.0.0 show clients".

One idea.

Jason
 
On Error Resume Next
strComputer = WScript.Arguments.Item(0)
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_NetworkAdapterConfiguration",,48)
For Each objItem in colItems
if (objItem.MACAddress <>"") and (objitem.ipconnectionmetric<>"") then
Wscript.Echo "Description: " & objItem.Description
for each ip in objItem.IPaddress
Wscript.Echo "IPAddress: " & ip
next
Wscript.Echo "MACAddress: " & objItem.MACAddress
END IF
Next

Will do it. Just save it as as vbs file and call it with scriptname
ipaddress.

--
Regards

Matjaz Ladava, MCSE, MCSA, MCT, MVP
Microsoft MVP - Active Directory
(e-mail address removed), (e-mail address removed)
http://ladava.com
 
Back
Top