Scripting Question

Wake-on-LAN Schedule Relay Labels?

12/06/2018 1577 views

I created a WOL schedule yesterday to wake computers in a lab 30 minutes before patching begins.  From what I see based on the detect and deploy job, the WOL command didn't deploy to the computers.  I have verified several times that WOL does with with these desktops by sending WOL commands to the computers from the K1000 and Symantec Ghost.  Do I need to assign a Relay Label?  What is a relay label?

Answer Summary:
0 Comments   [ + ] Show comments


Answer Chosen by the Author


Setup a smart relay label for each of your subnets and use that as the machines to do the wol command.  You just need one machine in that label to be on.  The only time your WOL will work without a relay label is the machine you have a browser to the SMA open and you want to wake machines on that same subnet.

Answered 12/06/2018 by: SMal.tmcc
Red Belt

  • Just to clarify, I need to setup a smart label containing the subnet that the machines are connected to in the lab I'm trying to wake up? And one of the machines in that relay smart label has to be on in order for the wake on lan command to work for all the machines within that group? If that is the case, how is that automated? I'm not going to be around at 11:30pm to make sure that one of those computers is awake in order for this WOL task to work.
    • Yes you need at least one machine on that subnet to be on.
      I set the bios on a couple of machines to turn on at 10:45pm on all my subnets for my Friday WSUS/ Kace patch-a-thon. They issue the WOL Kace command to wake up the others. If you have dell machines you can use the command|configure to change the bios remotely via a kscript
      • one other solution is to configure the routers to forward the magic packet across subnets. Something our network team refuses to do to our routers.
      • :) Thanks for that info! I had no idea there was a kscript to make BIOS changes! We are all Dell here on the PC side of things.
      • Where can I find this kscript? Do you mind sharing?

All Answers

This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.

If you have the Command|Configure installed you can just call that install to read or change the bios file. You do not need to create the zip, just call the cctk.exe from that install directory.

I have created a scripts that will read or change the bios on Dell machines even if the CCTK is not installed.  I installed the command configure on my tech station and just grabbed the needed files from it and added them as dependencies to the script.

To do this you need to create a ZIP from the Command|Configure installed to any workstation. You can get the install here:


(you can also create a distribution with the SMA to push out to all machines if you prefer it installed vs portable)

After it installs on the station navigate to (this is on a x64 machine) the install directory and send the four files and the files in the HAPI sub-directory to a zip file

The sub-directory "HAPI" under either directory, you must also copy those files to same directory as the main program files.  The contents of the zip will look like so:

This gives you a zip file you can attach to a kscript to call the program if you do not have it installed.  If installed just point the kscript to install directory.

the commands can be found here:


These will be the 3 settings you need to set:

cctk --autoon=selectdays:Fri --autoonhr=22 --autoonmn=35

Use the script above as an example (you need to load hapi to get commands to process) then you can create launch lines for the cctk to do the tasks.  You can set and also change set bios passwords with a script.

if you want a station to be booted when you walk in

cctk --autoon=weekdays --autoonhr=06 --autoonmn=30

You can also use this to read the bios into CIR's

to read the entire file:

Shellcommandtextreturn(cmd /c if exist C:\ProgramData\quest\KACE\user\bios.txt type C:\ProgramData\quest\KACE\user\bios.txt)

to read one line from the file use the findstr command

CIR List Bios Boot Order

ShellCommandTextReturn(cmd /c @echo off && for %g in (c:\programdata\quest\kace\user\bios.txt) do (findstr /b /c:"bootorder" %g))

CIR get wake on lan status

ShellCommandTextReturn(cmd /c @echo off && for %g in (c:\programdata\quest\kace\user\bios.txt) do (findstr /b /c:"wakeonlan" %g))

CIR get embnic status

ShellCommandTextReturn(cmd /c @echo off && for %g in (c:\programdata\quest\kace\user\bios.txt) do (findstr /b /c:"embnic" %g))

CIR get deep sleep ctrl

ShellCommandTextReturn(cmd /c @echo off && for %g in (c:\programdata\quest\kace\user\bios.txt) do (findstr /b /c:"deepsleepctrl" %g))

Answered 12/06/2018 by: SMal.tmcc
Red Belt

  • This is invaluable information. I can't thank you enough! THANK YOU!!
  • Ok...I've got all the steps in place and the task chain is working...kind of. I have a ticket open with support, but wanted to share what is going on.
    Here is the lineup:
    1) WOL at 1am
    2) Detect
    3) Detect and Deploy
    4) Shutdown Script

    The WOL works great! All 33 testing computers wake up.
    The Detect task works with all PCs completing it.
    I then have a Detect and Deploy task that follows the detect (this is probably redundant and I need to remove the Detect task in number 2 above). The Detect and Deploy has a force reboot with it. Last night, 25 computers had success. When I get in at 6:30am it shows 8 are still running the detect and deploy task. The shutdown task shows 1 success and 24 running. I checked on the lab and most of the computers are on, but there are about 10 computers that are shutdown.
    • Support and I figured it out together. Turns out, my shutdown script was a force shutdown. It wasn't giving the agent enough time to report back to the appliance that the task chain job had finished!
  • This content is currently hidden from public view.
    Reason: Removed by member request For more information, visit our FAQ's.
  • I had to change quite a few things in the script to get it to work such as the dependency directory, but I think I am almost there. However, I am running into a problem with the AutoOnHr=23
    It will not take 23 as 11PM, it changes it to 5:00 PM. The Dell link says to use integers between 0-23..but it doesn't convert 23 to 11pm. I ended up manually setting the BIOS AutoOnHr to 11:00:PM on my test PC, then installing the Dell Command |Configure 4.1.0 on the test PC, opened Configure only to find that 11PM = 35 ...WTH...that is not an integer between 0-23.
  • @SMal.tmcc I need some help creating the script to obtain the full BIOS information. When I mirror what you have to read the BIOS, I get errors in the log file and the bios.txt does not load onto the machine in the script's scope.
    • My email is under my profile contact me there

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ