BIOS Serial Number into Registry
I already have the Service Tag in the BIOS Serial Number field listed in and I would like to update the computers "System Description"
In kbox1000 admin interface:
Inventory/Computers/ - Click on individual Computer
Under Inventory Information, expand Hardware
Bingo! "BIOS Serial Number" in the KACE database *SOMEWHERE* ??????
WHY do I want this? It is our policy to use the Service Tag (aka BIOS Serial Number) as the
"System Description".
Over time we do not have the correct System Description (per our policy) in some computers. See example below.
Is something I can fix programmatically with KACE ?
Thanks,
Ross Warren
In kbox1000 admin interface:
Inventory/Computers/ - Click on individual Computer
Under Inventory Information, expand Hardware
Bingo! "BIOS Serial Number" in the KACE database *SOMEWHERE* ??????
WHY do I want this? It is our policy to use the Service Tag (aka BIOS Serial Number) as the
"System Description".
Over time we do not have the correct System Description (per our policy) in some computers. See example below.
Is something I can fix programmatically with KACE ?
Thanks,
Ross Warren
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
dchristian
14 years ago
Hey Ross,
I think this code will do it.
Let me know if you need help setting up the script in the scripting module of the 1000.
I think this code will do it.
Let me know if you need help setting up the script in the scripting module of the 1000.
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colBIOS = objWMIService. _
ExecQuery("Select SerialNumber from Win32_BIOS")
For Each objBIOS in colBIOS
strDescription = objBIOS.SerialNumber
Next
strKeyPath = "System\CurrentControlSet\Services\lanmanserver\parameters"
strValueName = "srvcomment"
Set objRegistry = GetObject _
("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
objRegistry.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strDescription
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.