Kaseya Community

How do I pull info from the bios into a custom field?

This question has suggested answer(s)

I am able to enter the asset tag into the bios and retrieve it with the following vbs script.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
Wscript.Echo "Part Number: " & objSMBIOS.PartNumber
Wscript.Echo "Serial Number: " _
& objSMBIOS.SerialNumber
Wscript.Echo "Asset Tag: " _

And then I found this xml file somewhere in keseya that will retrived the computer description and put it in a custom filed so I'm guessing I just slightly modify this script to get it to work, but I'm completely new to this.

<?xml version="1.0" encoding="utf-8"?>
<ScriptExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.kaseya.com/vsa/2008/12/Scripting">
<Procedure name="Get Computer Description" treePres="3" id="842349360" folderId="371859491752522" treeFullPath="myProcedures - Paul.Test">
<Body description="">
<Statement name="GetVariable" continueOnFail="false">
<Parameter xsi:type="EnumParameter" name="VariableType" value="WMIProperty" />
<Parameter xsi:type="StringParameter" name="SourceContent" value="root\cimv2:Win32_OperatingSystem.Description" />
<Parameter xsi:type="StringParameter" name="VariableName" value="desc" />
<Statement name="UpdateSystemInfo" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="ColumnName" value="ComputerDescription" />
<Parameter xsi:type="StringParameter" name="Value" value="#desc#" />

I can handle the obvious and change Computer Description to Asset Tag, but I'm guessing this is the key line:

 <Parameter xsi:type="StringParameter" name="SourceContent" value="root\cimv2:Win32_OperatingSystem.Description" />

What do I put in place of "root\cimv2:Win32_OperatingSystem.Description"

And excuse me if I put this in the wrong forum.  First time poster and new user.  
All Replies
  • You do not need this, the information about the bios are built in Kaseya, run the 3 audits and go in live connect to see this information....

    What do want to do with those tag ?

  • ...after running audits go to Audit>View Individual Data>System information..... select the machine and the information required is readily available. You can run a report to get this exported to excel or pdf from Info Center>Reports>New report pick appropriate.

    Hope this helps.

  • Thanks for the help.  I see Chassis Asset Number in Kaseya but it does not pull the Asset number i manually entered into the bios of the thinkpad.  I ended up figuring out how to do it by hacking the above and combining it.  Kaseya must be looking somewhere else for the Chassis Asset Tag number.  This is the line that worked.

         <Parameter xsi:type="StringParameter" name="SourceContent" value="root\cimv2:Win32_SystemEnclosure.SMBIOSAssetTag" />