Enable WoL in BIOS via BigFix

(imported topic written by rmnetops91)

If anyone is interested, we developed two tasks that will enable WoL in the BIOS on most Dell or HP Enterprise workstations/laptops. Basically what we did is downloaded Dell and HP’s BIOS command line configuration utilities, which allow modification of BIOS settings from Windows (works for most models). We then created a task to run these silently to “Enable” the WoL setting in the BIOS. It works well, and we were able to go from a shop where WoL was enabled on about 26% of our machines, to about 99% in a day.

Obviously use at your own risk, and do your own testing, as these are third party tools and dependent on following the tools instructions to generate the necessary packages:

#1 If you are an HP shop, you must download HP’s BIOSConfigUtility.exe, which is part of HP’s SSM, downloaded at the link below, and create a CONFIG.TXT file with the settings you want to change: http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=US&swItem=vc-87192-1&prodTypeId=18964&prodSeriesId=499896

Example CONFIG.TXT file:

English

Remote Wakeup Boot Source

Remote Server

*Local Hard Drive

S5 Wake on LAN

*Enable

Disable

#2 If you use Dell, you will need to install Dell’s Client Configuration Utility and generate a settings.exe package with the WoL setting you want to change: http://support.us.dell.com/support/downloads/download.aspx?c=us&l=en&s=gen&releaseid=R204280&formatcnt=1&libid=0&fileid=285029

In the following tasks we used the software distribution wizard to packge the files for each task. In the task action we also set a marker file so we can reference the marker file in the relevence for the task. This way we can deploy the task as a policy action that re-applies anytime it’s relevant (i.e. anytime the marker file doesn’t exist).

BigFix TASK #1: Enable WoL in BIOS - for HP:

download http://..com:52311/Uploads/a3d4dfd2ddbd91e18bd6b3630b0cd08cc286c1c2/HP.tmp

continue if {(size of it = 337904 AND sha1 of it = “a3d4dfd2ddbd91e18bd6b3630b0cd08cc286c1c2”) of file “HP.tmp” of folder “__Download”}

extract HP.tmp

waithidden __Download\BiosConfigUtility.exe /SetConfig:__Download\CONFIG.TXT

delete __appendfile

delete setwolmark.cmd

appendfile echo WoL BIOS marker set > %temp%\wolset.log

copy __appendfile setwolmark.cmd

waithidden setwolmark.cmd

BigFix TASK #2: Enable WoL in BIOS - for Dell:

download http://******.******.com:52311/Uploads/fbaea39bcb53c9b63f1088729c28264b32194b49/settingsexe.tmp

continue if {(size of it = 1123033 AND sha1 of it = “fbaea39bcb53c9b63f1088729c28264b32194b49”) of file “settingsexe.tmp” of folder “__Download”}

extract settingsexe.tmp

wait __Download\settings.exe

delete __appendfile

delete setwolmark.cmd

appendfile echo WoL BIOS marker set > %temp%\wolset.log

copy __appendfile setwolmark.cmd

waithidden setwolmark.cmd

(imported comment written by SystemAdmin)

rmnetops - we have been using a similar task but it uses a combo of actionscript and vbscript originally posted by Boyd. We also use some unofficial DELL content that Ben posted to detect how the clients are set. Have you found using the config utilities method to be any better?

On another note, have you tried / had any luck getting WWoL to work on DELL laptops?

(imported comment written by MattBoyd)

rmnetops / jspanitz

I’m assuming that the actionscript that rmnetops posted is enabling Wake-on-LAN in the BIOS of HP and Dell computers, but not in Windows. In my experience, it’s best to enable Wake-on-LAN both in the BIOS and in Windows. From what I can tell, enabling WoL in the BIOS will allow systems to wake from a shutdown state, while enabling it in Windows will allow WoL to work when resuming from standby. Of course, none of this is well documented, so perhaps I am wrong, and your results are different.

For Dell systems, you should be able to use WMI/VBScript instead of DCCU to enable WoL. This is what we’re doing in our environment.

(imported comment written by SystemAdmin)

boyd, good point. i believe you are dead on. WoL from a powered off state (bios) is what I was referring to here. We have not played much with WoL from Standy - mostly due to our lack of clear power policy.

Have you had any experience / success with WWoL from either BIOS or Standy on DELL?

(imported comment written by MattBoyd)

By WWoL, are you referring to Wireless Wake-on-LAN? Thankfully, I only have to worry about our wired clients (for now, at least). Do you have a significant number of WiFi clients?

(imported comment written by SystemAdmin)

Yes, Wireless WOL. About 1/3 of our clients are wired / wireless, so right now it’s not a huge issue. But there was talk of going wireless only at some point so we started testing WWoL. We have had zero success so far :frowning:

(imported comment written by MattBoyd)

Wow, that sounds challenging. Do all of your clients have Wifi hardware that supports WWoL? Out of my personal computers (laptops, home PCs), I think I only have one Wifi adapter that might support WWoL :confused:

I may have to upgrade my adapters and play around with WWoL at home… I leave my Media Center in standby a lot, and it’d be great to have a way to wake it remotely :slight_smile:

(imported comment written by rmnetops91)

boyd, You are correct we use these tasks to enable WoL in the BIOS for wake from poweroff. We use the BigFix task in the latest Power Management site to enable Wake from Standby.

What is the URL for the Dell WMI/VBscript method? I would like to test it out. It may prove easier for other customers than installing and creating the settings.exe file using DCCU.

jspanitz, we have not tested WWoL before, however the majority of our machines are hard-wired and any on wireless will most likely be in standby and not powered off. WWoL would be something we would need to test.

We have found using the config utilities has worked fine in our environment.

(imported comment written by MattBoyd)

rmnetops

What is the URL for the Dell WMI/VBscript method? I would like to test it out. It may prove easier for other customers than installing and creating the settings.exe file using DCCU.

Sure. I forgot to mention that you need to have Dell OpenManage Client Instrumentation (OMCI) installed, but I’d recommend installing OMCI even if you aren’t going to use this script.

Action Script:

createfile until END!   
'*** Declare variables Dim strNameSpace Dim strComputerName Dim strClassName Dim strKeyValue Dim objInstance Dim strPropName Dim strPropValue   
'*** Initialize variables strNameSpace = 
"root/Dellomci" strComputerName = 
"" strClassName = 
"Dell_SMBIOSSettings" strKeyValue = 
"0" strPropName = 
"WakeupOnLan"   
'*** Retrieve the instance of Dell_SMBIOSSettings class (there should 
'*** only be 1 instance). Set objInstance = GetObject(
"WinMgmts:{{impersonationLevel=impersonate}//./" & strNameSpace & 
":" & strClassName & 
"=" & _ Chr(34) & strKeyValue & Chr(34))   strPropValue = objInstance.Properties_.Item(strPropName).Value   
'*** Set the value of WakeUpOnLan only if it is not already '6
' ("Enable 
'*** for all NICs") 

if strPropValue  6 then 
'*** Set the new value for the property and save the instance objInstance.Properties_.Item(strPropName).Value = 6 objInstance.Put_ objInstance.Refresh_ wscript.echo ( objInstance.Properties_.Item(strPropName)) 
'*** If any errors occurred, let the user know If Err.Number  0 Then WScript.Echo 
"Enabling WakeUp On Lan failed." End If End If   END! delete EnableWOL.vbs copy __createfile EnableWOL.vbs waithidden cscript.exe /NoLogo EnableWOL.vbs

Relevance:

if exists (wmi 
"root\DELLOMCI") then (integer value of selects 
"WakeupOnLAN from Dell_SMBIOSsettings" of wmi 
"root\DELLOMCI" != 6 ) 

else (

false)

Oh, and I noticed that Dell released version 8 of OMCI recently. I didn’t test this script with that version, so you might want to stick with the latest version of OMCI 7 (7.8?). The VBScript is from the Dell OMCI Reference Manual. We also use WMI to set the BIOS password, perform BIOS updates, lock down the BIOS menu, and disable CD booting.

1 Like

(imported comment written by SystemAdmin)

I’ve read that OMCI 8 still exposes the old properites, but they have moved everything to support the new CIM 2.17 format.

From the release notes (http://support.dell.com/support/edocs/software/smcliins/cli80/EN/index.htm):

Supports access of the classes and properties of the new namespace at - “root/dcim/sysman,” through Dell Common Information Model (DCIM). The classes and properties of the 7.x version (legacy namespace) can be accessed at - “root/dellomci.”

We tested on a few clients and seems to work ok. But I guess a rewrite of the tasks / fixlets / analysis will be in order if we move to it - to future proof ourselves.

Curious, how are you doing the BIOS updates? Could you share? Really wondering how you target the clients.

Also, I’ve attached all our dell Analysis and Fixlets that we’ve "borrowed from the forums and “tweaked”. Hope it helps someone.

(imported comment written by SystemAdmin)

Files attached here. Forum bug prevents adding attachments to edited messages.

(imported comment written by MattBoyd)

Yeah, I’ve sort of given up on attachments on the forum…

Here’s the action script we use to deploy BIOS updates:

createfile until ENDOFFILE 
'********************************************************************** 
'*** Name: SampleFlash.vbs 
'*** Purpose: To flash the BIOS of a Dell OMCI client. 
'*** Usage: cscript.exe //nologo SampleFlash.vbs <systemname> <URL 
'*** of BIOS header file> 
'*** 
'*** This sample script is provided as an example only, and has not 
'*** been tested, nor is warranted in any way by Dell; Dell disclaims any 
'*** liability in connection therewith.Dell provides no technical 
'*** support with regard to such scripting. For more information on 
'*** WMI scripting, refer to applicable Microsoft documentation. 
'**********************************************************************   Option Explicit     
'*** Declare variables Dim strNameSpace Dim strComputerName Dim strClassName Dim strPropValue Dim objInstance Dim ObjOutParam Dim strMethod Dim objMethod Dim objClass Dim objInParam     
'*** Check that the right executable was used to run the script 
'*** and that all parameters were passed If (LCase(Right(WScript.FullName, 11)) = 
"wscript.exe" ) Or _ (Wscript.Arguments.Count < 2) Then Call Usage() WScript.Quit End If   
'*** Initialize variables strNameSpace = 
"root/Dellomci" strComputerName = WScript.Arguments(0) strClassName = 
"Dell_Configuration" strPropValue = 
"Configuration" strMethod = 
"FlashBios"   
'*** Retrieve the Dell_Configuration class Set objClass = GetObject(
"WinMgmts:{{impersonationLevel=impersonate}//" & _ strComputerName & 
"/" & strNameSpace & 
":" & strClassName)   Set objMethod = objClass.Methods_(strMethod)   
'*** Set the In parameter of the method to the URL of BIOS header file Set objInParam = objMethod.inParameters.SpawnInstance_() objInParam.sUrl = WScript.Arguments(1)   
'*** Execute the method Set ObjOutParam = objClass.ExecMethod_(strMethod, objInParam)   
'*** Let the user know whether the method returned success or not 
'*** Note: if return value is 0, it does not mean the system's BIOS has 
'*** been flashed, it only means that the flash method was initiated 
'*** successfully. If objOutParam.ReturnValue = 

true Then WScript.Echo 
"Method completed successfully." 

else WScript.Echo 
"Method failed." End If       
'*** Sub used to display the correct usage of the script Sub Usage() Dim strMessage strMessage = 
"incorrect syntax. You should run: " & vbCRLF & _ 
"cscript.exe //nologo SampleFlash.vbs <systemname> <URL of BIOS  header file>" WScript.Echo strMessage End Sub ENDOFFILE     copy __createfile FlashBios.vbs     download http:
//BESSERVER.COM:52311/Uploads/66252c222a2455ef120b98ac6d9d55a21377393f/O960-A07hdr.tmp 

continue 

if 
{(size of it = 2294185 AND sha1 of it = 
"66252c222a2455ef120b98ac6d9d55a21377393f") of file 
"O960-A07hdr.tmp" of folder 
"__Download"
}   extract O960-A07hdr.tmp   waithidden cscript flashbios.vbs . 
"{(pathname of client folder of current site) & "\__Download\O960-A07.hdr
"}"   delete FlashBios.vbs   action requires restart

Relevance (in this case the update is for a Optiplex 960):

(exists wmi 
"root\DellOMCI") and (string value of selects 
"model from win32_computersystem" of wmi) as trimmed string as uppercase = 
"OPTIPLEX 960" and not ((following text of first 
"A" of string value of select 
"Version from Dell_BIOSElement" of wmi 
"root\DellOMCI") as integer >= 7)

A few notes:

  • To perform a BIOS update in this manner, you must extract the “HDR” file from the standard BIOS update EXE that Dell provides before uploading it to BES. It’s very easy. At a command prompt, type “O960-A07.exe –writehdrfile” and the HDR should appear in the current folder.
  • After the script runs, the system reboots after ~60 seconds without any warning to the end user. I could not find a way to prevent this. You DO NOT want to run this task when a user is logged on.
  • In a few cases, the script may fail until after the system reboots. I’m not sure why this happens, but I’ve also seen it happen with Dell’s BIOS update executable, so I don’t think it’s because of WMI.

(imported comment written by MattBoyd)

jspanitz

I’ve read that OMCI 8 still exposes the old properites, but they have moved everything to support the new CIM 2.17 format.

Yeah, I did see that. I’m annoyed though that they seem to be encouraging users to stop using the old namespace, but have failed to provide a reference guide (at least, one that I could find) for the new CIM 2.17 format. I tried snooping through the new namespaces and it’s completely different, and I’m not sure that it includes all of the same functionality that the old namespace had. If that’s the case, then thanks a lot Dell.

(imported comment written by SystemAdmin)

LOL - finding the client is hard enough, then trying to find any docs on it is worse. There is only one doc out there that we saw. If you happen to come accross the conversion chart, please share it here.

FWIW, there are multiple threads requesting BigFix enter into the Hardware realm (one started by me :)). If we could convince them to support DELL OpenManage, this could be their headache (Guess my pitch for hardware support needs some work)! And now I fear we will only get IBM patches that somehow attempt to rebrand our DELLs ;).

http://forum.bigfix.com/viewtopic.php?id=1605

http://forum.bigfix.com/viewtopic.php?id=1712

http://forum.bigfix.com/viewtopic.php?id=231

John