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))
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)
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 )
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.
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