WakeUp class

This class provides the main interface for controlling WakeUp.


WakeName

Purpose

Send a wake up message to a single machine.

Inputs

  • string sInArg – the NetBIOS name of the target machine to be awoken

Returns

  • string sOutArg – returns a brief status message indicating success or failure
  • uint32 ReturnValue – Exit code 1 success
On this page:

WakeColl

Purpose

Sends a wake up message to all resources contained in a Configuration Manager collection and its sub-collections.

Inputs

  • The name of the Configuration Manager collection containing the machines to be awoke

Returns

  • Returns a brief status message indicating success or failure

MachinePolicyRefresh

Purpose

Sends a Machine policy refresh message to a single machine.

Inputs

  • The NetBIOS name of the target machine to receive the policy refresh

Returns

  • Returns a brief status message indicating success or failure

collectionPolicyRefresh

Purpose

Sends a Machine policy refresh to all resources contained in a Configuration Manager collection and its sub-collections.

Inputs

  • The name of the Configuration Manager collection containing the machines to receive the policy refresh

Returns

  • Returns a brief status message indicating success or failure

WakeAll

Purpose

Sends a wake up message to all resources contained in the Configuration Manager collection “All Systems”

Inputs

  • none

Returns

  • Returns a brief status message indicating success or failure

Deprecated

The following methods are deprecated and are no long supported.

  • MachineClientHealth
  • collectionClientHealth
  • MachineFixClientHealth
  • collectionFixClientHealth

Advertisements class

The read-only Advertisements class defines a table that holds all the Configuration Manager Adverts processed by WakeUp. The columns of the table are:

ColumnTypeDescription
AdvertisementNameStringThe name of the advertisement processed.
WU_Queueduint32The number of queued.
WU_Sentuint32The total number of wake ups sent.
WU_NotSentuint32The number of wake ups that did not reach their destination.
Awakeuint32The number of machines already awake.
WokeUpuint32The number of machines that were awoken.
WillPinguint32The number of awake machines without the 1E Agent installed.
Faileduint32The number of machines that failed to wake up.
>NumRunsuint32The number of times the advertisement was run.
LastRunTimedatetimeThe last time the advertisement was run.

Example

The following fragment JavaScript example retrieves the list of adverts and then iterates over the list converting to an HTML table containing the advertisement name. Clicking a name retrieves the advertisements details using the function GetColMembers(), not listed.

queryresult = false
oAdvertSet = null
oAdvertSet = gService.ExecQuery ("Select * from Advertisements")
queryresult = true
sList = ""
sList = sList + "<br><table border=\"1\"
width=\"100%\"> <tr><td
width=\"25%\">Advertisement Name</td><td
width=\"10%\">WU Sent</td><td
width=\"10%\">WU NotSent</td><td width=\"10%\">WokeUp</td><td
width=\"10%\">Awake</td><td
width=\"10%\">Will Ping</td><td
width=\"10%\">Failed</td></tr> "

if (queryresult)
{
   // QUERY WAS SUCCESSFULL, POPULATE THE TABLES //
   e = new Enumerator(oAdvertSet);
   for (;!e.atEnd();e.moveNext())
   {      
       obj = e.item();
       name = obj.AdvertisementName
       name = name.replace(" ","&nbsp;");
       sList = sList + "<tr><td  valign="top"><div Class=\"Link\"style=\"cursor:hand;\" onClick='GetColMembers(\"" + name +"\")' "
       sList = sList + "onMouseOver=\"style.color=OnColor\"onMouseOut=\"style.color=OffColor\">" + obj.AdvertisementName + 
               "</div></td><td  valign="top">" + obj.WU_Sent + "</td><td  valign="top">" + obj.WU_NotSent + "</td><td  valign="top">" + obj.WokeUp + "</td><td  valign="top">" + 
               obj.Awake + "</td><td  valign="top">" + obj.WillPing + "</td><td  valign="top">" + obj.Failed + "</td></tr>"
   }
}

Agents class

The read-only Agents class defines a table that holds all the 1E Agents discovered by wake up. The columns of the table are:

ColumnTypeDescription
AgentNameStringName of the discovered 1E Agent.
AgentNameAltStringName of the discovered 1E Agent's alternative.
MaxBurstuint32The number of ping packets to generate in a single burst.
BurstDelayuint32The delay in seconds between successive ping bursts.
WU_Queueduint32Number of queued wake ups.
WU_Sentuint32Total number of wake ups sent.
WU_NotSentuint32Number of wake ups that did not reach their destination.
Awakeuint32Number of machines already awake.
WokeUpuint32Number of machines that were awoken.
WillPinguint32Number of awake machines without the 1E Agent installed.
Faileduint32Number of machines that failed to wake up.
Stateuint32Currently known state of the 1E Agent.
AltStateuint32Currently known state for the 1E Agent's alternative.
LastSentTimedatetimeLast time a wake up signal was sent.
InSiteuint32Specifies whether the 1E Agent subnet is within or outside the site boundary. It will be set to one of the following values:

0 if the subnet is outside the site boundary

1 if the subnet is within the site boundary

Example

The following JavaScript fragment example retrieves the list of Agents and then iterates over the list converting to an HTML table containing the Agent name. Clicking a name retrieves the Agent's details using the function GetColMembers(), not listed.

queryresult = false
oAdvertSet = null
oAdvertSet = gService.ExecQuery ("Select * from Agents")
queryresult = true
sList = ""
sList = sList + "<br><table border=\"1\"
width=\"100%\"> <tr><td
width=\"20%\">Subnet</td><td width=\"20%\">AgentName</td><td
width=\"10%\">WU Sent</td><td
width=\"10%\">WU_NotSent</td><td
width=\"10%\">WokeUp</td><td
width=\"10%\">Awake</td><td
width=\"10%\">Will Ping</td><td
width=\"10%\">Failed</td></tr> "

if (queryresult)
{
   // QUERY WAS SUCCESSFULL, POPULATE THE TABLES //
   e = new Enumerator(oAdvertSet);
   for (;!e.atEnd();e.moveNext())
   {      
      obj = e.item();
      name = obj.IP_Subnet
      name = name.replace("","&nbsp;");
      sList = sList + "<tr><td  valign="top"><div Class=\"Link\"style=\"cursor:hand;\" onClick='GetColMembers(\"" + name + "\")' "
      sList = sList + "onMouseOver=\"style.color=OnColor\" onMouseOut=\"style.color=OffColor\">" + obj.IP_Subnet +
              "</div></td><td  valign="top">" + obj.AgentName + "</td><td  valign="top">" + obj.WU_Sent + "</td><td  valign="top">" + obj.WU_NotSent +
              "</td><td  valign="top">" + obj.WokeUp + "</td><td  valign="top">" + obj.Awake + "</td><td  valign="top">" + obj.WillPing + "</td><td  valign="top">" + 
              obj.Failed + "</td></tr>"
   }
}
sList = sList + "</table>"
List.innerHTML = sList