so … It’s been 2 months since I fired up my windows computer
how come?
(my significant other uses the monitors that are on the same KVM my windows machine is for her work, so I need her to not be working and the christmas new years is the time of the year she’s most busy… excuses, excuses, anyway).
this means I can test some stuff above on windows, see how it works.
1. Notepad
Open a new file, and paste in the following:
# source: https://www.pdq.com/blog/wake-on-lan-wol-magic-packet-powershell/
$Mac = "38:D5:47:02:50:2F"
$MacByteArray = $Mac -split "[:-]" | ForEach-Object { [Byte] "0x$_"}
[Byte[]] $MagicPacket = (,0xFF * 6) + ($MacByteArray * 16)
$UdpClient = New-Object System.Net.Sockets.UdpClient
$UdpClient.Connect(([System.Net.IPAddress]::Broadcast),7)
$UdpClient.Send($MagicPacket,$MagicPacket.Length)
$UdpClient.Close()
I took the mac address from one of your screenshots above, no idea if that’s the right one you have written down from before – maybe you want to try replacing.
save as:
File name: C:\Users\Chris\wake_chris_machine.ps1
Save as type: All Files
Basically save it somwhere, not the desktop, desktop will contain a launch shortcut.
You need both a file and a shortcut because that makes windows more secure or something (I don’t know - there’s probably experts who know the real reason)
2. Make a shortcut on desktop
Right click on the desktop, click “New Shortcut”
for “Location of the item” use the following long string:
C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File C:\Users\Chris\wake_chris_machine.ps1
Replace Chris / last part with a path to the file you just saved.
it’ll ask you for a name, … type anything - “wakey wakey” maybe? You’ll get something that looks like this, but you can change the icon to whatever.
When you double click it, it will run powershell and send the magic wake on lan packet.
How will you know it works … ? try it.
3. Profit … probably (or debug and profit more)
If you double click, it should just work, but if it doesn’t, you can install wireshark.
and compare your packets to that of the funky software.
what to do in wireshark to debug, with screenshots
Wireshark captures network packets – so you can look at what that software is sending.
Here’s the first screen where you can setup a filter:
I typed in port 7 in the filter above … and click the blue shark fin icon in the top left to start the capture.
When I click the wakey waky shortcut on desktop I get a packet in the top list … when I click it, I get details.
Hopefully this works for you, maybe it’s useful to someone else too.