PowerShell auto-updater script for Devolutions Gateway

This PowerShell script is meant to be registered as a scheduled task that runs once a day to check for updates, download and then install them. This script is especially useful when using multiple gateways as it saves a lot of time.

Read this GitHub page for more details.

Installing

  1. Download the auto-updater PowerShell script.
  2. Open an elevated PowerShell terminal.
  3. Move to the directory containing the GatewayUpdater.ps1 script.
  4. Run it using the install parameter.
PS > .\GatewayUpdater.ps1 install

TaskPath                                       TaskName                          State
--------                                       --------                          -----
\                                              Devolutions Gateway Updater       Ready
Updater script installed to 'C:\Program Files\Devolutions\Gateway Updater\GatewayUpdater.ps1' and registered as 'Devolutions Gateway Updater' scheduled task

Running

By default, the scheduled task will run every day at 3AM. It can also be manually triggered by using the following command: & schtasks.exe /Run /TN "Devolutions Gateway Updater"
The status of the scheduled task can then be queried:

PS > schtasks.exe /Query /TN "Devolutions Gateway Updater"

Folder: \
TaskName                                 Next Run Time          Status
======================================== ====================== ===============
Devolutions Gateway Updater              Date     3:00:00 AM    Ready

The updater automatically downloads the installer if there is a new version is available, then checks the file hash before running it silently.

Uninstalling

This will unregister the scheduled task and delete the GatewayUpdater.ps1 script from the path used in the command.

  1. Open a PowerShell terminal.
  2. Run the GatewayUpdater.ps1 script with the uninstall parameter.
PS > .\GatewayUpdater.ps1 uninstall

Folder: \
TaskName                                 Next Run Time          Status
======================================== ====================== ===============
Devolutions Gateway Updater              Date     3:00:00 AM    Ready
SUCCESS: The scheduled task "Devolutions Gateway Updater" was successfully deleted.
Devolutions Forum logo Give us Feedback