Skip to content

Get update inventory for unit

Gets a list of update inventory for a specific unit.

GetUpdateInventoryForUnit(Byval UnitName as String, Byval UnitType as String) as ArrayList

UnitName (String)

Name or UUID of the unit to retrieve inventory for

UnitType (String)

Type of the unit. You can use the name or the Id of the unit type. If UnitName is a UUID, UnitType is ignored.

  • “Computer” or “1”
  • “User” or “2”

The function returns an array of Update Inventory items. Each element (inv) in the array is a joined line with the character defined with Set splitter.

  • Qfename
  • InstallDate
  • Update.ID
  • Update.Name
  • Revision
  • InstallCount
  • Status
Set oCMS = CreateObject("CapaInstaller.SDK")
Set aUnit = CreateObject("System.Collections.ArrayList")
wscript.echo oCMS.SetInstanceManagementPoint("1")
Set aUnit = oCMS.GetUpdateInventoryForUnit("Klient","User")
for each item in aUnit
wscript.echo item
next