Preparing packages for distribution

Version 2.0 of the Packaging PowerBench introduces a concept to separate the working copy of a package from the version currently in production and distributed. The concept is described in this chapter:

In version 1.0 of the PPB, there was exactly one package directory that contained everything a package needed to run:

  • Script with the actual execution logic
  • Source files for the software to be installed
  • Runtime files needed for execution, such as the PowerShell App Deployment Toolkit, the Package Deployment Module, and helper files.


The problem with the previous concept is that a package already in distribution cannot be changed without running the risk that the changes could negatively affect the ongoing distribution. While it is usually necessary - after changes have been made - to actively make them known in the respective distribution system (for example, in the Configuration Manager console via the "Update content" menu item in the context of a deployment type of an application), there is of course always the risk that such changes are inadvertently or unknowingly adopted in production and then cause damage or at least break a functioning distribution.

As a solution to this problem, the concept of package revisions was introduced in PPB 2.0. The concept is based on the mechanism known from Ivanti DSM, that works in a way, that packages to be distributed, first a copy is has to be created in a subdirectory "rev\<revision number>" of the package dir - known in DSM as "Prepare for distribution". The PPB has adopted this concept in that it now recommends that you perform the "Prepare for Distribution" action before registering a package.

If this button on the "Management" ribbon is clicked, the current status of the working package is copied to a "rev\<revision number>" subdirectory of the package - if necessary after asking whether the changes should be saved.

Since you can perform this action more than once for a package, a prompt will appear if the corresponding subdirectory already exists.

If you confirm the prompt with "Yes", the existing directory will be overwritten. With "No" you cancel the action and the existing status is retained. If required, you can create a new revision of the package and then store the current status in a new "rev" subdirectory.

If you have enabled script code signing, you may be prompted to enter the password for the signing certificate. This occurs if you are using a certificate file and the password in the settings is either incorrect or you deliberately omitted it. If you press "Cancel" at this point, the copying process continues but the digital signatures are not created.

If the action for the package had not yet been executed or if you answered the message for overwriting with "Yes", you will receive a message that the package has been prepared for distribution (or export) in the specified directory.

If you want to distribute the package via Microsoft Configuration Manager (or also via another software distribution system) or export it to another format, you should reference the "<package-directory>\rev\<package-revision>" directory as the source directory.