Get User Inventory
Description
Section titled “Description”Gets the user inventory for a specific user. To get the software inventory for a user, use Get software inventory for unit.
Syntax
Section titled “Syntax”GetUserInventory(Byval UserName as String) as ArrayList
Parameters
Section titled “Parameters”UserName (String)
The user name of the user. The user is found by name only. The domain of the user isn’t used.
Return value
Section titled “Return value”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.
Example
Section titled “Example”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 itemnext