Importing DSM packages

The Packaging PowerBench also allows you to import exported DSM packages and convert them into a PowerShell script. Therefore, to import a DSM package in the PPB, proceed as follows:

  • In the DSM console, export the DSM package to any temporary directory.
  • If you have just opened the PPB, click "Import DSM Package" on the start screen.

  • Alternatively, select "Import" from the "File" menu or click the "Import DSM Package" icon in the "Tasks" tab.

  • Now the dialog for the import of DSM packages appears:



    Here you must select or specify the Script.inc of the exported package in the "DSM Package" field. After the selection, the name of the DSM Package is read from the "_ExpInfo.xml" and suggested as the package name for the PPB package. The dialog also suggests a location for the package.
  • Optionally, you can specify the location of a DSM variable file. You create this file by selecting the "Tools > Show All Variables..." menu item in the DSMC Infrastructure view and then using the "Export..." button to save the variables known to DSM together with their current values in a CSV file.  The dialog expects a standard export file with the naming scheme "_ExpList_AllVariables_*.csv".
  • Adjust the name and location if necessary and confirm the import dialog with "OK".


The script is now analyzed and an attempt is made to convert as many commands as possible into the corresponding PowerShell commands. A typical package created by NetInstall-Spy looks like this after import and conversion:



If you have imported a DSM Package, you may notice some comments beginning with "[Note]:" that speak of arguments that are reversed, unsupported, or added. These comments are not errors, but are intended to inform you that options were set in the original script that were changed or needed to be changed during the conversion, and also briefly tell you the reason for the change. You can multi-select the comments and delete them if they are no longer relevant to you.

Typical comments are:

Comment

The option /TS is not supported and was converted to /TW

Description

In DSM, the /TS option stands for the command classification "Command to be executed per service (computer-related)". Because the PPB only distinguishes between the computer part and the user part, such commands are changed to the Computer-related command classification.

Severity

Warning

Action

Please check if the converted command works as expected.


Comment

Command '<Name of the eScript command>' is undefined.

Description

This DSM eScript command cannot (yet) be translated in PowerShell. Please see the note below.

Severity

Error

Action

You must implement the action that the original command performed.


Comment

The following variables are undefined

Description

Variables were found in the script that could not be converted.

Severity

Error

Action

You must initialize these variables, which might have been internal DSM variables or used without declaration, in the PowerShell script for the script to work.


Note: If an eScript command cannot be translated because the corresponding PackageDeployment counterpart has not yet been implemented, the note "[Note]: Command '<Name of the eScript command>' is undefined" is logged. You must then try to change the logic of the script or map the missing command using PowerShell onboard tools. In any case, please also contact us so that we can support you.