There is a command line version of WOL called WakeOnLanC.exe. It's main purpose is to support the task scheduler, but it can be used for any reason to wake up and shutdown hosts just like the GUI. These are the command line options:
Command | Description |
---|---|
-s | shutdown, requires -m or -all |
-s1 | sleep, requires -m or -all |
-s4 | hibernate, requires -m or -all |
-a | abort a shutdown, requires -m *** Depreciated |
-r | reboot |
-w | wakeup, requires -m, -mac, or -all |
-l | listen for WOL packets |
-e | enumerate host list |
-p "xx" | specify path to machines.xml database * this works on the GUI also |
-if xx | select network interface to use for WOL |
-h | display help |
Options | |
-t xx | time delay (xx = seconds). For shutdown and reboot commands. |
-f | Force files closed. |
-m xx | xx = machine name |
-mac xxxx | MAC address |
-g xx | xx = a group to startup or shutdown. |
-all | All machines |
-c "xx" | xx = popup message for shutdown or reboot command. |
Shutdown machine named "LaMachine", the comment will be "Power Failure":
C:\>WakeOnLanC -s -m LaMachine -c "Power Failure"
Wakeup machine named "LaMachine":
C:\>WakeOnLanC -w -m LaMachine
Wakeup machine by MAC address:
C:\>WakeOnLanC -w -mac 00:43:18:9E:8E:A0
Reboot "LaMachine", force files closed, delay for 20 seconds:
C:\>WakeOnLanC -r -m LaMachine -t 20 -f
Listen for and display WOL packets on the local subnet, for troubleshooting.
C:\>WakeOnLanC -l
Hibernate all machines.
C:\>WakeOnLanC -s4 -all
Wakeup machine by MAC address using a specific network interface:
C:\>WakeOnLanC -if 192.168.0.20 -w -mac 00:43:18:9E:8E:A0