/
Get package units
Get package units
Description
Returns a list of units linked to the package.
Syntax
GetPackageUnits(Byval PackageName as String, Byval PackageVersion as String, Byval PackageType as String) as ArrayList
Parameters
PackageName (String)
The name of the package
PackageVersion (String)
The version of the package
PackageType (String)
Type of package
- "1" (Computer)
- "2" (User)
Return Value
The function returns an array of units. Each unit (unit) in the array is a joined line with the character defined with Set splitter.
- unit.Name
- unit.Created
- unit.LastExecuted
- unit.Status
- unit.Description
- unit.GUID
- unit.ID
- unit.Type.Name
Example
VBScript
Set oCMS = CreateObject("CapaInstaller.SDK") Set aUnit = CreateObject("System.Collections.ArrayList") wscript.echo oCMS.SetDefaultManagementPoint("1") Set aUnit = oCMS.GetPackageUnits("CMS4-Upgrade","v4.1","1") for each item in aUnit wscript.echo item next
, multiple selections available,
Related content
CMS_GetPackageStatus
CMS_GetPackageStatus
More like this
Business Unit support
Business Unit support
More like this
CMS_RemovePackageFromUnit
CMS_RemovePackageFromUnit
More like this
$cs.MSI_GetPropertiesFromMSI
$cs.MSI_GetPropertiesFromMSI
More like this
CMS_AddPackageToUnit
CMS_AddPackageToUnit
More like this
CMS_AddUnitToWSUSUnAssignedGroup
CMS_AddUnitToWSUSUnAssignedGroup
More like this