Using Powershell and the Dell OMCI to enable Wake On LAN on your Dell Workstation

Sometimes forgotten (mostly because I usually don’t see it in the downloads) is the Dell OMCI install for your Workstations.  If you haven’t been installing it, GET IT DEPLOYED NOW!

The Dell OMCI is an extension to Windows Management Instrumentation, which allows you to access very specific features of your Dell right down to the BIOS level.

Imagine being able to Manage settings in your BIOS like TPM or Wake on LAN.  Or PERHAPS head office has mandated all systems need to have a BIOS level password?

Can you imagine having to walk to 1,000 different machines and DO that? Hit me with a frying pan now.

To get it installed is just a matter of downloading the particular installer based upon whether you’re running a 64bit version of Windows or 32bit version.

You can download the media Here and push it via whichever method works best for you, and ensure it’s part of your Gold Dell image.

They provide you with some ok examples in Powershell but I found most actually didn’t work.  But here’s why, I think the scripts were tested on an older Dell OMCI version.

So here’s how you can work with them.  It’s all just a matter of using the GET-WMIOBJECT. 

They provided an example for Getting the status of Wake on LAN in the BIOS.  No matter what I did. It wouldn’t work.  Here’s the example.

gwmi DCIM-BIOSEnumeration -namespace rootdcimsysman -filter "AttributeName=’Wake On LAN’"

I personally prefer expand names to Aliases so I put that into my world first.

GET-WMIOBJECT DCIM-BIOSEnumeration -namespace rootdcimsysman -filter "AttributeName=’Wake On LAN’"

What did  I get? Nothing.  Nada.  Zippo.  $NULL.   But it also didn’t cough up an error.   So I went for something simpler.  Pull out the filter and see what I DID get

GET-WMIOBJECT DCIM-BIOSEnumeration -namespace rootdcimsysman

My screen flooded with output.  This was better.  

So I ran that through GET-MEMBER and found some useful properties exposed like “AttributeName” and “CurrentValue”.   So I sorted it by AttributeName and used Select-Object to see what the actual names of the BIOS settings were when exposed  by Dell OMCI.

GET-WMIOBJECT DCIM-BIOSEnumeration -namespace rootdcimsysman | SORT-OBJECT AttributeName | Format-Table AttributeName,CurrentValue

image

“AHA!” Jumping up like Einstein.   The name provided by Dell in the Example was WRONG. Wake On Lan ACTUALLY had Hyphens in the name. So a quick change in the example from this

GET-WMIOBJECT DCIM-BIOSEnumeration -namespace rootdcimsysman -filter "AttributeName=’Wake On LAN’"

to

GET-WMIOBJECT DCIM-BIOSEnumeration -namespace rootdcimsysman -filter "AttributeName=’Wake-On-LAN’"

to match the details EXPOSED by the Dell OMCI and suddenly

image

Now smiling and content I dived into the Dell examples provided to find out how to TURN it on.  

(gwmi DCIM-BIOSService -namespace rootdcimsysman).SetBIOSAttributes($null,$null,"Wake On LAN","4")

Every time I ran this I got the following error causing me to scream like Charlie Brown missing the football. “Aiihhighihghghghighhigihh!!!!”

image

But then again, I wondered.  “Did they make the same mistake?” I looked and sure enough “Wake on LAN” was missing the Hyphens.

So again change the provided example from

(gwmi DCIM-BIOSService -namespace rootdcimsysman).SetBIOSAttributes($null,$null,"Wake On LAN","4")

to a working one

(gwmi DCIM-BIOSService -namespace rootdcimsysman).SetBIOSAttributes($null,$null,"Wake-On-LAN","4")

image

I rebooted my laptop to check and sure enough Wake on Lan was enabled.   I madly ran about our IT Group installing the Dell OMCI and turning on Wake On LAN settings to test.     Running ///o//’s script for Wake on LAN to test I had guys shutting down their machines.

*poof* *poof* *poof* Each machine magically accepted the Magic Packet.  

Now the cool part if you know anything about WMI is now that you know the NameSpace Dell has the OMCI in you can immediately pull up all the OTHER available extensions to query and export them to a CSV file like so.

GET-WMIOBJECT -namespace rootdcimsysman –list | export-csv c:powershelldellomci.csv

Having a list of these is making it a bit more easy to poke through the pile.   I’m playing with enabling TPM remotely and I’ll post about that sometime soon.  

Remember, work SMARTER not HARDER with Powershell

Sean
the Energized Tech

Leave a Reply