Skip to content

CMS Functions

The CMS category contains various functions used in conjunction with CMS. Use them in a package to manage group membership, link and unlink packages, read and write inventory, read package status, and control end user cancellation and the colors of InfoCenter balloon messages.

Most CMS functions send a request to the CapaInstaller server, which reads or changes the data right away. The client must be able to reach the CapaInstaller server when the package runs.

  • VBScript: If a request fails, the function returns False, and the error from the server is written to the package log. Each request takes at least two seconds, so avoid calling these functions many times in a loop.
  • PowerShell (PowerPacks): If a request fails, the function throws an exception. Use try/catch if the package must continue.

Some functions don’t send a request to the CapaInstaller server. They use settings and package information on the client instead: the color scheme functions, CMS_DefineEndUserCancellation, CMS_GetContainer, CMS_GetPackageProperties, CMS_GetUninstallSource, CMS_IncrementSessionID, CMS_JobRetryLater, CMS_RerunAgent and CMS_SetPackageStatusToNotCompliant. In VBScript, this also applies to CMS_RemovePackageFromUnit, CMS_RerunPackage and CMS_RunSystemAgent.