Skip to content

Get User Inventory

Gets the user inventory for a specific user. To get the software inventory for a user, use Get software inventory for unit.

GetUserInventory(Byval UserName as String) as ArrayList

UserName (String)

The user name of the user. The user is found by name only. The domain of the user isn’t used.

The function returns an array of User Inventory items. Each element (inv) 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

If the user isn’t found, the function raises an error.

Set oCMS = CreateObject("CapaInstaller.SDK")
Set aUnit = CreateObject("System.Collections.ArrayList")
wscript.echo oCMS.SetInstanceManagementPoint("1")
Set aUnit = oCMS.GetUserInventory("Klient")
for each item in aUnit
wscript.echo item
next