?
Solved

Find MAC address of turned off remote computer

Posted on 2008-10-28
7
Medium Priority
?
4,140 Views
Last Modified: 2013-11-09
I am on an enterprise level network. I would like to get the MAC address of a remote computer so that I can wake it remotely through it's NIC using the Wake on LAN utility. The remote computer is on my network in my domain.

Thanks
0
Comment
Question by:pciatto
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 17

Expert Comment

by:JohnGerhardt
ID: 22823152
ARP table of the switch it is connected to?
0
 
LVL 50

Expert Comment

by:Don Johnston
ID: 22823650
If the computer obtains it's IP address from a DHCP server, there may still be a binding for it on the server.

If the computer hasn't been off for more that 4 hours, there may still be an entry in the ARP cache of the default-gateway.

Other than that, I can't think of any other way to determine the MAC of powered-off PC.
0
 

Author Comment

by:pciatto
ID: 22823648
Thank you for your response.

How do I find the ARP table of the switch? What do I type in the command line? Do I need the IP address of the switch , if so, how do I obtain it?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 50

Expert Comment

by:Don Johnston
ID: 22823655
What brand/model switch?
0
 
LVL 17

Expert Comment

by:JohnGerhardt
ID: 22823708
If you can get the IP of the switch then we can have a look..
I am sure there is a reason but is it not easier to get the machine turned on by some means and then get the MAC address...????!!!
0
 
LVL 2

Accepted Solution

by:
raffraffraff earned 500 total points
ID: 24303252
John, I think the point of the question is that he doesn't know in advance that he will need the MAC address of this PC. For example, he may needs to update a large number of Windows PCs out of business hours with a script. Active Directory doesn't store MAC addresses. Basically, he needs to  find the MAC addresses in a cache somewhere, and the only places that I can think of are the DHCP server or the router/switch.

The best option is to modify your environment so that each PC caches its MAC address somewhere useful.

I support 8000 Linux PCs for a bank, and I make use of Wake On Lan extensively, so I need MAC addresses. However, I record each MAC address when the PCs register themselves in the LDAP directory. For Windows PCs you could possibly do something similar with a startup script, making use of some Active Directory attributes that you don't require, like 'comment' or 'location':

My Windows scripting is rusty, but you might be able to get this working:

Imports System.Management
Try
 Dim MACAddress as string = ""
 Dim Query As String = _
 "SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True"
 Dim query As ManagementObjectSearcher = New ManagementObjectSearcher(Query)
 Dim queryCollection As ManagementObjectCollection = query.Get()

 ' Search for the MAC address in these results
 Dim mo As ManagementObject
 For Each mo In queryCollection
  MACAddress = mo("MacAddress").ToString().Replace(":", "")
 Exit For
 Next
 Return MACAddress
Catch ex As Exception
 Return ""
End Try

' Modify Computer Location Attribute
Set objComputer = GetObject _
("ldap://cn=computer101,cn=Computers,dc=company,dc=com")
objComputer.Put "Location" , MACAddress
objComputer.SetInfo

For each 'wake' event, you could query Active Directory (even from a Linux box running ldapsearch!) and extract the MAC address of any PC.

PS: I know this question is old, but there are no answers, and this might help somebody. Also note, PCs/Servers with multiple adapters will have problem with this script.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question