Oh, we don't grab MAC address. For your purposes, you could add that in just below where it gets the IP Address:
strMACAddress = objItem.MACAddress
Main Topics
Browse All TopicsHi,
I have a list of IP addresses and mac addresses extracted in Excel spread sheet. Can you assist me how to write a script that allows me to translate the 300 IP address into their related host name? I am using Windows XP professional in Windows 2003 Active Directory network.
Thanks,
Savi
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: IconoclastXPosted on 2007-11-05 at 11:11:33ID: 20218507
Without actually having the computers live, a list of IP addresses and MAC addresses will get you nothing more than what you already have. What is your goal with this?
elect * from Win32_ComputerSystem",,48) y elect * from Win32_BIOS",,48)
ELECT * FROM Win32_NetworkAdapterConfig uration WHERE IPEnabled=TRUE", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)
Here's a script we use here to keep track of some inventory items. We use a fairly standard array of IBM computers, so we haven't had much problem with this running just fine. After this section of the script, we have something that will write it out to a csv file that we can access. We run this as part of the login, so the csv file is updated every time someone logs in.
Dim strComputer, colItems, objItem, objWMIService
strComputer="."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("S
For Each objItem In colItems
cComputerName = objItem.Caption
cLoginName = objItem.UserName
cManufacturer = objItem.Manufacturer
cModel = objItem.Model
cTotalMem = objItem.TotalPhysicalMemor
Next
Set colItems = objWMIService.ExecQuery("S
For Each objItem In colItems
cSerialNum = objItem.SerialNumber
Next
Set colItems = objWMIService.ExecQuery("S
For Each objItem In colItems
strIPAddress = Join(objItem.IPAddress, ",")
Next