Solved

Find MAC address of turned off remote computer

Posted on 2008-10-28
7
4,001 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Hello All, I have been training on Multicast for a while now and whenever I start the topic , I find out that my friends /  Colleagues mention that they do not know how to test Multicast Joins. As most of the multicast would be video traffic and …
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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