Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 30534

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

$
0
0

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: " _
& objSMBIOS.SMBIOSAssetTag
Next
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.
http://community.kaseya.com/kb/w/wiki/audit-the-computer-description-field.aspx
<?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>
<Statement name="UpdateSystemInfo" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="ColumnName" value="ComputerDescription" />
<Parameter xsi:type="StringParameter" name="Value" value="#desc#" />
</Statement>
</Body>
</Procedure>
</ScriptExport>

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.  

Viewing all articles
Browse latest Browse all 30534

Trending Articles