Procedure for Wake On Lan (WOL) using WakeMeOnLan

Here is a procedure to populate the WakeMeOnLan and two procedures for Wake On Lan, one is for all computers and one is for specified computers. You can try and combine the scan one to the other two if you wish but I have not tested if the wake waits for the scan to finish first.

DO NOT run this procedure on the computer you want to wake up! It can take the computer a little while to wake up enough to access remotely. Make sure your WakeMeOnLan computer list is updated periodically.

Here is a link to WakeMeOnLan: www.nirsoft.net/utils/wake_on_lan.html



Requirements for either version:

WakeMeOnLan accessible via share or local copy on the computer per network (subnet) that will run the procedure. This computer needs to be on and accessible thus a server is a good host. THIS IS NOT THE COMPUTER THAT YOU WANT TO WAKE UP! WakeOnLan must have the computers populated which can be done manually or via a scan.

The computer to be awakened must be compatible and configured already to allow and accept WOL packets. Check BIOS and OS settings to make sure. A good test is to try waking the computer via WakeMeOnLan for another computer directly and make BIOS and OS changes until you get the computer to wake up as desired. Yes this is hard to do for already deployed off-site computers.

Some computers or NICS are not compatible. If your BIOS has WOL settings and your computer has two NICS, but the WOL is not working, try the other NIC. I have seen motherboards where only one the NICS is attached to the BIOS WOL setting.


Procedure to scan network to populate your computers in WakeMeOnLan:


import subprocess;

# Change C:\wakemeonlan\WakeMeOnLan to what ever path you have WakeMeOnLan stored and populated
# Please see the site http://www.nirsoft.net/utils/wake_on_lan.html for more options like wake ip-ranges

process=subprocess.Popen([r"T:\Comodo Procedure Files\wakemeonlan\WakeMeOnLan", "/scan"],stdout=subprocess.PIPE);

result=process.communicate()[0]
print (result)

Procedure to wake all computers configured in WakeMeOnLan:

MAKE SURE YOU CHANGE THE PATH TO FIT YOUR ENVIRONMENT

Here is the link to the procedure: 20170404-Wake-On-Lan-(WOL)—All.json


import subprocess;

# Change C:\wakemeonlan\WakeMeOnLan to what ever path you have WakeMeOnLan stored and populated
# Please see the site http://www.nirsoft.net/utils/wake_on_lan.html for more options like wake ip-ranges

process=subprocess.Popen([r"C:\wakemeonlan\WakeMeOnLan", "/wakeupall"],stdout=subprocess.PIPE);

result=process.communicate()[0]
print (result)

Procedure to wake a specific computers configured in WakeMeOnLan:

MAKE SURE YOU CHANGE THE PATH TO FIT YOUR ENVIRONMENT

MAKE SURE TO MANUALLY CHANGE THE PROCEDURE’S COMPUTER/IP/MAC TO THE ONE YOU WANT TO WAKE UP EACH TIME YOU RUN THE PROCEDURE (that information can be gotten from Comodo ITSM>devices>network)

You could make a procedure for individual computers instead.

Here is the link to the procedure: 20170404-Wake-On-Lan-(WOL)—Specific-Computers.json


import subprocess;

# Change C:\wakemeonlan\WakeMeOnLan to what ever path you have WakeMeOnLan stored and populated
# Change computername/ip/MAC to which ever computer name, ip or MAC you want to wake as it shows in your WakMeOnLan
# Please see the site http://www.nirsoft.net/utils/wake_on_lan.html for more options like wake ip-ranges

process=subprocess.Popen([r"C:\wakemeonlan\WakeMeOnLan", "/wakeup", "computername/ip/MAC"],stdout=subprocess.PIPE);

result=process.communicate()[0]
print (result)

20170404-Wake-On-Lan-(WOL)—All.json (933 Bytes)

20170404-Wake-On-Lan-(WOL)—Specific-Computers.json (1.12 KB)

Great contribution to the community, thank you very much @alphatecsd !!!