Description
Gets custom inventory for a specified unit.
Syntax
This function is overloaded, meaning that two separate parameter sets are available;
UnitName and UnitType
GetCustomInventoryForUnit(Byval UnitName as String, Byval UnitType as String) as ArrayList
Uuid
GetCustomInventoryForUnitUUID(Byval Uuid as String) as ArrayList
Parameters
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
Return value
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
Example (UnitName and UnitType)
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
Example (Uuid)
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