Solved

Wake on LAN using IP Address

Posted on 2014-04-30
4
767 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
[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
4 Comments
 
LVL 38

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 35

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 81

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

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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