Solved

Wake on LAN using IP Address

Posted on 2014-04-30
4
745 Views
Last Modified: 2014-04-30
I'm using a Powershell script that sends a magic packet to wake a pc that's turned of. It sends the magic packet based on MAC address.

Is there a script, or a way, to send a magic packet based on IP address instead of MAC address?
0
Comment
Question by:SvenIA
4 Comments
 
LVL 37

Accepted Solution

by:
Gerwin Jansen, EE MVE earned 300 total points
ID: 40032034
I don't full understand, WOL works with a MAC address, not with IP.

Do you want a script that looks up a MAC address that (currently) belongs to a certain IP address and then send a WOL packet to that MAC address?

<edit>
$hostIp = [System.Net.Dns]::GetHostByName("your_computer_name").AddressList[0].IpAddressToString
$wmi = gwmi -Class Win32_NetworkAdapterConfiguration -ComputerName "your_computer_name"
$mac = ($wmi | where { $_.IpAddress -eq $hostIp }).MACAddress

Open in new window

0
 
LVL 34

Assisted Solution

by:Dan Craciun
Dan Craciun earned 150 total points
ID: 40032318
@Gerwin Jansen: will an offline computer respond to the WMI request?
Just asking, cause I never tried it.

@SvenIA: if the computer is powered off, it does not have an IP address. That's why the magic packet is sent to a MAC address.
0
 
LVL 79

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 50 total points
ID: 40032422
a powered o will not respond to anything.  When you set WOL active in the bios the network card is in a low power state only listening for a magic packet sent to its mac address
0
 
LVL 7

Author Closing Comment

by:SvenIA
ID: 40033928
Thanks guys. I didn't know that WOL only works with MAC addresses. Now I know :) !
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
Set OWA language and time zone in Exchange for individuals, all users or per database.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

825 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