cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbeale53
Blue Screen Again
Posts: 18
Registered: ‎05-01-2015
Location: US
Views: 5,289
Message 1 of 7

Detect BIOS version to determine if update needs to be applied during TS?

I've been working a BIOS upgrade into our task sequence, and so far your toolset is working well for me.  However, it applies the BIOS upgrade without checking to see if it needs the upgrade.  I haven't been able to test, but I believe it may even downgrade if the BIOS I'm trying to apply is actually older than what is installed on the system.  

 

I've been trying to develop a WQL query that can determine the version of the BIOS on the system and apply the upgrade if it has an older BIOS. I'm trying to query against Release Date, but it doesn't seem to be an option in SCCM to query against that, or at least I haven't figured out a way.  Is there anything that you could recommend to address this?

 

Thanks!

Lenovo Employee rbkirk
Lenovo Employee
Posts: 775
Registered: ‎02-20-2009
Location: US
Views: 5,268
Message 2 of 7

Re: Detect BIOS version to determine if update needs to be applied during TS?

A query that would reveal the BIOS version would be something off of the SMBiOSBIOSVersion field

 

wmic bios get SMBIOSBIOSVersion

 

The two digit number embedded in roughly the middle of the string returned is the version number.

 

As an example, in my machine, issuing "wmic bios get SMBIOSBIOSVersion" from a command prompt returns

 

N1WET41W (1.20 )

 

The "41" is a release level. (so is the 1.20, but I would go off of "41")

 

Also, the preceeding "N1W" indicates the family of the system...in my case, a T470s. All T470s's using that particular BIOS flash start with "N1W" from the SMBIOSBIOSVersion field. You can use that to parse off of what type of system gets what BIOS flash...all Thinkpads have a different but family specific first three digits in that field.

 

Usually the ET indicates its a Thinkpad, while Thinkcentre machines will usually have a KT in that field.

 

Lenovo Employee tlawson
Lenovo Employee
Posts: 1,019
Registered: ‎03-03-2016
Location: US
Views: 5,255
Message 3 of 7

Re: Detect BIOS version to determine if update needs to be applied during TS?

jbeale53,

 

Check out our Recipe Cards on our Think Deployment Resource Center for good deployment information on our ThinkPad, ThinkCentre, and ThinkStation models.  It includes some WQL queries for identifying BIOS, Model, and Machine Type.  Our SMBIOSBIOSVersion query searches for the first 4 but not the actual version number.  What rbkirk stated above is correct around the field to look at.  You can pull all of that information and get a more granular look at the version if you prefer to not use the actual SMBIOSBIOSVersion field.

 

Tlawson

 

 

Lenovo Employee pjorgensen
Lenovo Employee
Posts: 577
Registered: ‎06-09-2015
Location: US
Views: 5,217
Message 4 of 7

Re: Detect BIOS version to determine if update needs to be applied during TS?

in addition to rbkirk and tlawson's advise, the condition in your task sequence step that queries if the bios is older than the current version available on the web will look like this:

 

select * from WIN32_BIOS where SMBIOSBIOSVersion < "N1WET41W (1.20)"
jbeale53
Blue Screen Again
Posts: 18
Registered: ‎05-01-2015
Location: US
Views: 5,200
Message 5 of 7

Re: Detect BIOS version to determine if update needs to be applied during TS?

Thanks, but unfortunately that's only for Thinkpads (and I believe Thinkstations, maybe?).  The Thinkcentre doesn't have the version number at the end.  

 

Thanks for the recommendations so far - still trying to figure out how to query against a part of what's returned (in the example above, using the 6th and 7th characters in the BIOS version)

Lenovo Employee pjorgensen
Lenovo Employee
Posts: 577
Registered: ‎06-09-2015
Location: US
Views: 5,194
Message 6 of 7

Re: Detect BIOS version to determine if update needs to be applied during TS?

which MTM are you working with?

 

edit:

 

i tested on a thinkstation p320 tiny that has bios version M1AKT2AA. the web shows the latest bios is M1AKT2CA.  i simply updated my query to select * from WIN32_BIOS where SMBIOSBIOSVersion < "M1AKT2CA" and my smsts.log evaluated the condition to be true.

Highlighted
0SD
Fanfold Paper
Posts: 5
Registered: ‎01-03-2019
Location: SE
Views: 132
Message 7 of 7

Re: Detect BIOS version to determine if update needs to be applied during TS?

Thanks so much, those Recipe Cards are awesome. Well done!

Check out current deals!


Shop current deals

Top Kudoed Authors