Skip to content

Get custom inventory for unit

Gets custom inventory for a specified unit.

This function is overloaded, meaning that two separate parameter sets are available;

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

GetCustomInventoryForUnitUUID(Byval Uuid as String) as ArrayList

UnitName (String)

The name of unit to get custom inventory for

UnitType (String)

The type of unit stated in UnitName. Two different values are accepted;

  • “Computer”
  • “User”

Uuid (String)

The uuid of unit to get custom inventory for in the format;  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

The function returns an array of custom inventory. Each element in the array is a joined line with the character defined with Set splitter.

  • inv.Category
  • inv.Entry
  • inv.Value
  • inv.Datatype
  • inv.GUID
  • inv.ID

VBScript

Set oCMS = CreateObject("CapaInstaller.SDK")
Set aUnit = CreateObject("System.Collections.ArrayList")
wscript.echo oCMS.SetDefaultManagementPoint("1")
Set aUnit = oCMS.GetCustomInventoryForUnit("Klient","User")
for each item in aUnit
wscript.echo item
next

VBScript

Set oCMS = CreateObject("CapaInstaller.SDK")
Set aUnit = CreateObject("System.Collections.ArrayList")
wscript.echo oCMS.SetDefaultManagementPoint("1")
Set aUnit = oCMS.GetCustomInventoryForUnitUUID("E3FBEC1E-32AC-4E51-AB9F-A644CD9F0A6B")
for each item in aUnit
wscript.echo item
next