Get packages on management server
Description
Section titled “Description”Gets a list of packages on the specified Management Server.
Syntax
Section titled “Syntax”GetPackagesOnManagementServer(Byval ServerName as String, Optional Byval PackageType as String = “”) as ArrayList
Parameters
Section titled “Parameters”ServerName (String)
The name of a Management Server on the current management point.
PackageType (String)
Type of package
- “Computer”
- “User”
This parameter is optional. The function currently ignores it and always returns all packages linked to the Management Server, of both types. To get only one type, filter on the p.Type field.
Return value
Section titled “Return value”The function returns an array of packages. Each package (p) in the array is a joined line with the character defined with Set splitter.
- p.Name
- p.Version
- p.Type (“Computer” or “User”)
- p.DisplayName
- p.IsMandatory
- p.ScheduleId
- p.Description
- p.GUID
- p.ID
- p.IsInteractive
- p.DependendPackageID
- p.IsInventoryPackage
- p.CollectMode (always empty)
- p.Priority
- p.ServerDeploy (always empty)
Example
Section titled “Example”Set oCMS = CreateObject("CapaInstaller.SDK")Set aUnit = CreateObject("System.Collections.ArrayList")wscript.echo oCMS.SetInstanceManagementPoint("1")Set aUnit = oCMS.GetPackagesOnManagementServer("SRVOSLO2","Computer")for each item in aUnit wscript.echo itemnext