Solved

Wake on LAN using IP Address

Posted on 2014-04-30
4
729 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 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 78

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Set OWA language and time zone in Exchange for individuals, all users or per database.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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…

760 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

22 Experts available now in Live!

Get 1:1 Help Now