Get all inventory packages
Description
Section titled “Description”Returns all Inventory packages.
Syntax
Section titled “Syntax”GetAllInventoryPackages(Optional Byval PackageType as String = "") as ArrayList
Parameters
Section titled “Parameters”PackageType (String)
Type of package
- “Computer”
- “User”
This parameter is optional, meaning that it is not required. If not stated, all inventory packages are returned
Return value
Section titled “Return value”The function returns an array of Inventory packages. Each package (p) in the array is a joined line with the character defined with Set splitter.
- p.Name
- p.Version
- p.Type
- p.DisplayName
- p.IsMandatory
- p.ScheduleId
- p.Description
- p.GUID
- p.ID
- p.IsInteractive
- p.DependendPackageID
- p.IsInventoryPackage
- p.CollectMode
- p.Priority
- p.ServerDeploy
Example
Section titled “Example”VBScript
Set oCMS = CreateObject("CapaInstaller.SDK")Set aUnit = CreateObject("System.Collections.ArrayList")oCMS.SetDefaultManagementPoint("1")oCMS.SetSplitter (";")Set aUnit = oCMS.GetAllInventoryPackages("Computer")for each item in aUnit wscript.echo split(item,";")(2) & vbtab & split(item,";")(1) & vbtab & split(item,";")(0)nextOutput
Section titled “Output”The output from the example above could look like this;
Microsoft (R) Windows Script Host Version 5.8Copyright (C) Microsoft Corporation. All rights reserved.Computer v4.1 CitrixInventoryComputer v4.1 CMS4-UpgradeComputer v4.1 CustomInventoryComputer v4.1 CustomSoftwareInventoryComputer v4.1 FileScannerComputer v4.1 HFInventoryComputer v4.1 HotFixInstallerComputer v4.1 HWInventoryComputer v4.1 License ConsolidationComputer v4.1 LogonInventoryComputer v4.1 PerformanceGuardComputer v4.1 SWInventory