Skip to content

CMS_AddHardwareInventory

Adds a HardwareInventory row to the database that is persistent, meaning that the data will not be flushed out the next time that the HardwareInventory package is run.

CMS_AddHardwareInventory(category, entry, value, valuetype)

Category name

variable name

value (string)

If you are inserting a Time (valuetype: “T”) it must be set in epoch-time, meaning seconds since January 1. 1970. The scripting library has a function called GetEpochTime, which will convert a date to seconds since 1-1-1970.

If you want to use ‘now’ as the value, you can either insert;

  • an empty string (“”)
  • or the value (“0”)

The type of the value

Valid valuetypes are;

  • “S” for string
  • “I” for integer
  • “T” for time

Boolean, TRUE if function completed successfully.

If bStatus Then bStatus = CMS_AddHardwareInventory("BIOS Information", "Socket type", "Mill-A" "S")
If bStatus Then bStatus = CMS_AddHardwareInventory("CPU", "Fan speed", "1360" "I")
If bStatus Then bStatus = CMS_AddHardwareInventory("Sound Adapter", "SoundBlaster compatiple", "True" "S")

Scripting Guidelines

CMS_RemoveHardwareInventory Constants Package Property Variables Business Unit support