CMS_RerunPackage
Description
Section titled “Description”Sets status for the specified package to ‘Waiting’ causing it to rerun the next time the Agent is being executed.
- VBScript: The status is set on the client. The package must be known by the agent on the client. You can also call the function from a user package.
- PowerShell: The status is set in CapaInstaller. If the package isn’t linked to the unit, it’s linked with the status ‘Waiting’.
Syntax
Section titled “Syntax”CMS_RerunPackage(sPackage, sVersion) as Boolean[bool]CMS_RerunPackage -package <string> -version <string>Parameters
Section titled “Parameters”sPackage (String)
Section titled “sPackage (String)”Name of package
sVersion (String)
Section titled “sVersion (String)”Version of package
Return value
Section titled “Return value”Boolean, TRUE if function completed successfully.
Boolean, TRUE if function completed successfully.
Example
Section titled “Example”If bStatus Then bStatus = CMS_RerunPackage("CapaInstaller", "v1.0")if (CMS_RerunPackage -package 'Microsoft Office 366' -version 'v2.0') { $cs.Job_WriteLog("Waiting", "Office Leap year will be reinstalled on next agent run")}