Find BIOS Version

Hi,

I am trying to write a fixlet that looks at the current BIOS version and if it is under a certain value, run a task to update it. My relevance is borrowed from other sources on this forum. Each time I run it, I get “It” used outside of “whose” clause. I guess that is because my relevance isn’t formed properly. If so, I am not sure what I need to do to restructure it. Thoughts?

(exists wmi) and (item 0 of it = "optiplex 990" and item 1 of it < "A18") or (item 0 of it = "optiplex 9010" and item 1 of it < "A09") or (item 0 of it = "optiplex 9020" and item 1 of it < "A10") or (item 0 of it = "optiplex 755" and item 1 of it < "A22") of ((string value of select "Model from Win32_ComputerSystem" of wmi as trimmed string as lowercase) , (substring after "=" of (selects ("SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string) as uppercase))

Thanks

It looks like you’re missing parentheses. I’m not sure if this is exactly the logic that you want, but this will at least evaluate:

(exists wmi) and ((item 0 of it = "optiplex 990" and item 1 of it < "A18") or (item 0 of it = "optiplex 9010" and item 1 of it < "A09") or (item 0 of it = "optiplex 9020" and item 1 of it < "A10") or (item 0 of it = "optiplex 755" and item 1 of it < "A22")) of ((string value of select "Model from Win32_ComputerSystem" of wmi as trimmed string as lowercase) , (substring after "=" of (selects ("SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string) as uppercase))

I would not recommend using WMI for this since there is a better SMBIOS inspector which works on Win, Linux, and Unix. (in general it is better to use native relevance inspectors instead of WMI when an equivalent native relevance inspector is available)

See this example: http://bigfix.me/analysis/details/2994751

unique values whose(it != "") of (it as string as trimmed string) of values "bios_version" of structures "bios_information" of smbios

Also, see this BIOS update task for an example: http://bigfix.me/fixlet/details/3912

Additionally, my presentation from Interconnect this year covers using Dell Command Update + the REST api to generate BIOS update tasks automatically: https://docs.google.com/presentation/d/1pME28wdjkzj9378py9QjFyMOyOHcamB6bk4k8z-c-r0/edit?usp=sharing

Using the method described in my presentation and the tasks I have shared on BigFix.me it is possible to very quickly generate BIOS update tasks for dell systems in an automated way. ( You don’t actually have to figure anything out, the working tasks I have shared will do what you need )

See these Dell Command Update Tasks:

http://bigfix.me/fixlet/details/3900
http://bigfix.me/fixlet/details/3901
http://bigfix.me/analysis/details/29947431
http://bigfix.me/fixlet/details/3902
http://bigfix.me/fixlet/details/3905

1 Like

The smbios inspector does not work for me running Windows 7 in VirtualBox, though wmi does. I’m not sure why yet.

1 Like

How odd about VitrualBox. I’ll have to try that and see. It could be that there is something quirky about VirtualBox’s DMI/SMBIOS implementation, but that doesn’t really explain why it would work through WMI if they are effectively looking in the same place using similar APIs.

That example fixlet is great. Too bad I can’t get it working… I tried to change it for use with my 755s, but the task just hangs at the install part. No custom error log is ever written, even shows a failure in the regular log. I have no idea how to troubleshoot that. Thanks for the great suggestions so far.

Its getting stuck right there and hangs.

Did you try running the BIOS update on the admin command line manually to see what it says / does?

What is the failure in the regular log?

Are you trying to update a BIOS that is too old and requires a previous update to be applied first?

Just out of curiosity why didn’t one of the basic BIOS inspectors work for you?

version of bios
version strings of bios

They contains the same information as the smbios call for example and one does work on a few more platforms

1 Like

The command from the fixlet won’t run when entered manually in the command line. It just produces an error stating: “Invalid command, Please makes sure the program executed properly.” There is no help switch for the EXE file, so I can’t determine what the right syntax would be. Thanks

According to this:

http://support.bigfix.com/inspectors/System%20Objects_Any.html#bios

the BIOS inspector only works on windows:

On a non-Windows operating system, it returns FALSE.

So the SMBIOS inspector seems to be better supported on multiple platforms.

It seems that page is a bit confusing all over.

the <bios> object is available on Mac and Windows and hopefully soon on other platforms

The smbios is available on some Linux platforms yes, but only Intel based ones. It will not work on PPC or S390X Linux variants.

1 Like