Solved

Find MAC address of turned off remote computer

Posted on 2008-10-28
7
3,963 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
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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 125 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Strange problem with ISP / Cable modem 4 62
power requirement for single rack 8 60
small, multi network, problem 3 79
NEXUS3524 - SFP validation failed 3 51
Do you have a computer or other electronic gear that is attached to a rat nest of cables, or alternatively have your cables all bundled nice at neat?  If so then read this post to sidstep common pitfalls. When I was a student at DeVry University,…
This article will step through configuring a SonicWALL appliance to utilize an internal DHCP server for Global VPN Client (GVC) hosts.  There are times when using an external (external to the SonicWALL) DHCP server, such as Windows Servers, isn’t pr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

943 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

Need Help in Real-Time?

Connect with top rated Experts

1 Experts available now in Live!

Get 1:1 Help Now