CMS_GetPackage
Description
Section titled “Description”Returns the requested package
Syntax
Section titled “Syntax”Not supported because the return type Cipackage is not available in VBScript[CiPackage] CMS_GetPackage -package <string> -version <string>Properties
Section titled “Properties”package (String)
Section titled “package (String)”Name of the package
version (String)
Section titled “version (String)”Version of the package
Return value
Section titled “Return value”The function will return an instance of CiPackage:
class CiPackage { [bool]$Serverdeploy [string]$Platform [int]$Dependendpackageid [int]$Id [string]$Name [string]$Version [string]$Type [string]$Scheduleid [bool]$Ismandatory [bool]$Isinteractive [string]$Synchronizepriority [string]$Displayname [string]$Description [string]$Capapackid [string]$Capapackupdate [string]$Capapackupdates [string]$Capapackappid [string]$Capapackdateadded [bool]$Isinventorypackage [bool]$Iscapapack [bool]$Iscapapackandcanbeupdated [int]$Priority [string]$Icon [int]$Cmpid [int]$Release [string]$Script [string]$Swiid [string]$Inactiveperiod [bool]$Hasinstallscript [bool]$Hasuninstallscript [bool]$Haspostscript [bool]$Hasuserconfigurationscript [int]$Devicetypeid [string]$Devicetype [string]$Advertisementtag [bool]$Ispowerpack [int]$Linkedunitcount [int]$Linkedgroupcount [int]$Folderid [string]$Folderpath [int]$Statuscancelledcount [int]$Statusinstallingcount [int]$Statusfailedcount [int]$Statusuninstallcount [int]$Statuswaitingcount [bool]$Scheduleactive [string]$Guid [string]$Objecttype}Example
Section titled “Example”$package = CMS_GetPackage -package "The Perfect Package" -version "v1.0"$cs.Job_WriteLog("package Name:", $package.Name)$cs.Job_WriteLog("package Description:", $package.Description)$cs.Job_WriteLog("package Type:", $package.Type)$cs.Job_WriteLog("package Version:", $package.Version)$cs.Job_WriteLog("package DisplayName:", $package.DisplayName)$cs.Job_WriteLog("package FolderPath:", $package.Folderpath)$cs.Job_WriteLog("package CmpId:", $package.Cmpid)$cs.Job_WriteLog("package GUID:", $package.Guid)$cs.Job_WriteLog("package IsPowerPack:", $package.Ispowerpack)
# Expected output:2023-11-19 22:09:40 - package Description: I've got a ticket to the moon, I'll be leaving here any day soon. Yeah, I've got a ticket to the moon But I'd rather see the sunrise, in your eyes2023-11-19 22:09:40 - package Type: 12023-11-19 22:09:40 - package Version: v1.02023-11-19 22:09:40 - package DisplayName: The Perfect Package v1.02023-11-19 22:09:40 - package FolderPath: Time2023-11-19 22:09:40 - package CmpId: 12023-11-19 22:09:40 - package GUID: a331b6b6-752f-4cd5-a916-69158406f6922023-11-19 22:09:40 - package IsPowerPack: True