CMS_GetPackage
Description
Returns the requested package
Syntax
Not supported because the return type Cipackage is not available in VBScript
[CiPackage]CMS_GetPackage -package <string> -version <string>
Properties
package (String)
Name of the package
version (String)
Version of the package
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
PowerShell
$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 eyes
2023-11-19 22:09:40 - package Type: 1
2023-11-19 22:09:40 - package Version: v1.0
2023-11-19 22:09:40 - package DisplayName: The Perfect Package v1.0
2023-11-19 22:09:40 - package FolderPath: Time
2023-11-19 22:09:40 - package CmpId: 1
2023-11-19 22:09:40 - package GUID: a331b6b6-752f-4cd5-a916-69158406f692
2023-11-19 22:09:40 - package IsPowerPack: True
Related functions
Â