Wake on Lan Unicast does not change from broadcast

Trying to get wake on lan working using unicast. Have done packet captures of both uni and directed broadcast and they are identical. Checking the unicast box or installing with WOLUNICAST=1 does not appear to change anything. Am I missing something?

It looks like this is a bug. It will be fixed in the next release.

Cool, any easy way to manually fix this by editing the .ps file?

I haven’t tested this, but based on what Ryan sent me change Line 36 of Device - WOL.ps1 to this:

if ($Unicast -eq "True") {$strMask = "255.255.255.255"}

Change line 44 of Device - WOL.ps1 to this:

if ($Unicast.ToUpper() -eq "TRUE") {$strOutput = $strOutput + "`nUnicast"}

And change line 786 Multiple - WOL.ps1 to this:

if ($Unicast -eq "True") {$SubnetMask = "255.255.255.255"}

Interesting. My device - WOL.ps1 file is very different. Your line 36 string is not found anywhere

Here is my current device wol.ps1
<#
Author: Ryan Ephgrave
Now Micro Right Click Tools
#>

#region Get variables
$GetDirectory = $MyInvocation.MyCommand.path
$Directory = Split-Path $GetDirectory
Import-Module “$Directory\Functions - Working.ps1”
Import-Module “$Directory\Functions - Col Depl.ps1”

Process-Options
$Port = $OptionHash[“WOLPort”]
$Unicast = $OptionHash[“WOLUnicast”]
$PacketsToSend = $OptionHash[“PacketsToSend”]

if ($Port -eq $null) {$Port = 12287}
if ($Unicast -eq $null) {$Unicast = “False”}
if ($PacketsToSend -eq $null) {$PacketsToSend = 1}

$ResourceID = $args[0]
$strServer = $args[1]
$strNamespace = $args[2]

$wolPath = “$Directory\wolcmd.exe”
$Popup = New-Object -ComObject wscript.shell

if ($ResourceID.Contains(".")) {
$CompName = $ResourceID
$SplitCompName = $CompName.Split(".")
$strQuery = “Select ResourceID from SMS_R_System where Name like '” + $SplitCompName[0] + “’”
Get-WmiObject -Query $strQuery -Namespace $Namespace -ComputerName $Server | ForEach-Object {$ResourceID = $.ResourceID}
}
else {
$strQuery = “Select ResourceID,ResourceNames from SMS_R_System where ResourceID=’$ResourceID’”
Get-WmiObject -Query $strQuery -Namespace $Namespace -ComputerName $Server | ForEach-Object {$CompName = $
.ResourceNames[0]}
}
#endregion

$strQuery = “Select * from SMS_G_System_NETWORK_ADAPTER_CONFIGURATION where ResourceID=’$ResourceID’”
Get-WmiObject -Query $strQuery -Namespace $strNamespace -ComputerName $strServer | ForEach-Object {
$strIP = $.IPAddress
$strMask = $
.IPSubnet
$strMac = $_.MACAddress
if ($Unicast.ToUpper() -eq “TRUE”) {$strMask = “255.255.255.255”}
Wol -CompName $CompName -MAC $strMac -IP $strIP -SubnetMask $strMask -Port $Port -PacketsToSend $PacketsToSend
}

if ($Script:SuccessfulArray.Count -gt 0) {
$strOutput = “Successfully sent WOL packet to $CompName” + “. Sent to:n" foreach ($instance in $Script:SuccessfulArray) { $strOutput = $strOutput + "nMAC: " + $instance.Two + “nIP: " + $instance.Three if ($Unicast.ToUpper() -eq "TRUE") {$strOutput = $strOutput + "nUnicast”}
else {$strOutput = $strOutput + “nSubnet Mask: " + $instance.Four + " "} $strOutput = $strOutput + "nPort:” + $instance.Five + “`n”
}
$Popup.Popup(”$strOutput",0,“Successful”,0)
}
else {$Popup.Popup(“Could not send a WOL packet to $CompName”,0,“Error”,16)}

I’m not quite sure if the line number are correct because of the formatting, but it looks like lines 45 and 53 in the text you posted. Basically, remove anything that says

$Unicast.ToUpper() -eq "TRUE"

and replace it with

$Unicast -eq "True"

Upgraded to 2.3 this morning, edited the lines. Changed WOL port to 9. WOL is working. Thanks!!!

What exactly did you edit in the powershell skript?
I have the same problem that even thou the server is configured to use unicast, right click tools is using subnet directed broadcast.

If you open up Device - WOL.ps1 and Multiple - WOL.ps1, you can search for:

$Unicast.ToUpper() -eq "TRUE"

and replace it with:

$Unicast -eq "True"

This should be on line 36 and 44 of Device - WOL.ps1 and line 786 of Multiple - WOL.ps1.