Get logon history for unit
Description
Section titled “Description”Gets a list of logon history information for a specific unit.
Syntax
Section titled “Syntax”GetLogonHistoryForUnit(Byval UnitName as String, Byval UnitType as String) as ArrayList
Parameters
Section titled “Parameters”UnitName (String)
Name or UUID of the unit to retrieve inventory for
UnitType (String)
Type of the unit
- “1” (Computer)
- “2” (User)
Return value
Section titled “Return value”The function returns an array of Logon 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
Example
Section titled “Example”VBScript
Set oCMS = CreateObject("CapaInstaller.SDK")Set aUnit = CreateObject("System.Collections.ArrayList")wscript.echo oCMS.SetDefaultManagementPoint("1")Set aUnit = oCMS.GetLogonHistoryForUnit("Klient","1")for each item in aUnit wscript.echo itemnext