/build/static/layout/Breadcrumb_cap_w.png

Extract BIOS dates to sort systems by age

We currently have close to 5,000 Windows PCs that vary from brand new to around 8 years old. They are a mixture to various brands, most being Dell, HP and Gateway. The majority came from a PC refurnisher so there is no inventory from invoice data.Our department has been asked to sort the machines by age so that the oldest machines can be replaced first. The K1000 lists BIOS age in the description on some machines, but not on most. Any suggestions on how to cull system ages using the K1000?

0 Comments   [ + ] Show comments

Answers (3)

Posted by: rmeyer 12 years ago
Second Degree Blue Belt
1
You can run this as a script on the PC's then do a custom inventory :)


strComputer = "."
dim ReleaseDate
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colBIOS = objWMIService.ExecQuery _
("Select * from Win32_BIOS")
For each objBIOS in colBIOS
' Wscript.Echo "Release Date: " & objBIOS.ReleaseDate
ReleaseDate = objBIOS.ReleaseDate
Next

FullDate = Left(ReleaseDate, 8)
RelYear = Left(FullDate, 4)
MonthDay = Right(FullDate, 4)
RelMonth = Left(MonthDay, 2)
RelDay = Right(FullDate, 2)


'To test the Year/Month/Date
'wscript.echo FullDate
'wscript.echo RelYear
'wscript.echo RelMonth
'wscript.echo RelDay


const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_
strComputer & "\root\default:StdRegProv")

'Write it into a registry key so you can make a custom inventory
Return = objReg.SetStringValue(HKEY_LOCAL_MACHINE,"SOFTWARE\KACE","BIOSReleaseDate",RelYear & "-" & RelMonth & "-" & RelDay )

Comments:
  • How exactly did you write the custom inventory for this script? - baileyb 12 years ago
Posted by: jvincent 12 years ago
Orange Belt
1
Thank you so much René. We'll give that a go and will report back the results after it has been tested and deployed.

John
Posted by: ms01ak 12 years ago
10th Degree Black Belt
1
I'd be interested in how that works for you, please let us know.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ