Command line

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:

-sshutdown, requires -m or -all
-s1sleep, requires -m or -all
-s4hibernate, requires -m or -all
-r reboot
-wwakeup, requires -m, -g, -mac, or -all
 use -mac and -agent to explicitly send WOL packet to specific IP 
-llisten for WOL packets
-eenumerate host list
-p “xx”specify path to machines.xml database  * this works on the GUI also
-msgimmediate message (example -msg -c “Shutting down in 10 minutes”
-pw “xx”change shutdown password for a machine, requires -m, -g or -all
-hdisplay help
-t xxtime delay (xx = seconds).  For shutdown and reboot commands.
-fForce files closed.
-m xxxx = machine name
-mac xxxxMAC address
-g xxxx = a group to startup or shutdown.
-allAll machines
-agent xxxx = address of WOL agent if on remote subnet, use with -mac
-c “xx”xx = popup message for shutdown or reboot command.

Command line examples

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