Skip to main content
Matrix42 Self-Service Help Center

Update with PowerShell script

Overview

An alternative way to update the DWP or ESM is to run a PowerShell script that performs exactly the same process as the Setup Wizard during the update and additionally has several configurable options.

 The script is available at  

root\Matrix42\Matrix42 Workplace Management\bin\Matrix42.ProductUpdate.ps1 

The update script is shipped with the Distributive by default, starting from 10.0.3 DWP version.

The script accepts as input parameters all the required for update data that is pre-configured before running the script:

Screen Shot 2020-12-15 at 12.46.21 PM.png

 

Configuration file

All options of the PowerShell script are available in the configuration file, located at root\Matrix42\Matrix42 Workplace Management\bin\Matrix42.ProductUpdate.xml

<?xml version="1.0"?>
<configuration>
    <appSettings>
    
        <add key="ServiceAccount" value="" />
        <add key="ServiceAccountPassword" value="" />
        <add key="InstallerDirectory" value="" />
        <add key="InstallationDirectory" value="" />

        <add key="SkipFilesBackup" value="false" />
        <add key="SkipDatabaseBackup" value="false" />
    </appSettings>
</configuration>

Where:

  • InstallerDirectory (mandatory): full path to source folder of the update files;
  • InstallationDirectory (mandatory): full path to the installation target folder;
  • ServiceAccount name and ServiceAccountPassword credentials;
  • SkipFilesBackup: by default, this option is set to false, and the system runs the backup of the installation directory;
  • SkipDatabaseBackup: by default, this option is set to false, and the system runs the backup of all databases, including M42Production, M42Archive, M42Warehouse, M42InstanceStore (if the default names were not changed during the system installation);

Update process

The script:

  • Starts maintenance mode
  • Suspends Matrix42 Workers
  • Stops Services
  • Creates database backups (if enabled)
  • Backups files (if enabled)
  • Runs the update

Troubleshooting

In case an error occurs, you can Cancel the update process.

Cancel option runs the rollback process and, contrary to the update, restores all data from the backup files (database, files if available), restarts the system, starts the services, and removes the maintenance mode.

Restore stages depend on the available rollback data, for instance, if the update process was interrupted on the file backup that was not completed, the files can’t be restored.

  • Was this article helpful?