Sample Scripts and BIOS Settings 67
WHERE " & _
strKeyName & "=" & Chr(34) & strComputerName &
Chr(34)
'*** Retrieve instances of Dell_Configuration class
(there should only
'*** be 1 instance).
Set colInstances =
GetObject("WinMgmts:{impersonationLevel=
impersonate}//"&_
strComputerName & "/" &
strNameSpace).ExecQuery(strWQLQuery, "WQL",
NULL)
'*** Use only first instance to retrieve asset tag,
service tag, and BIOS
'*** version
For Each objInstance in colInstances
strMessage = "Asset Tag: "
strMessage = strMessage &
objInstance.Properties_.Item
("AssetTag").Value
strMessage = strMessage & vbCRLF & "Service
Tag: "
strMessage = strMessage &
objInstance.Properties_.Item
("ServiceTag").Value
strMessage = strMessage & vbCRLF & "BIOS
Version: "
strMessage = strMessage &
objInstance.Properties_.Item
("BIOSVersion").Value
Exit For
Next
'*** Display the results
WScript.Echo strMessage
'*** Sub used to display the correct usage of the
script