> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell/de/devolutions-gateway-powershell/powershell-auto-updater-script-for-devolutions-gateway.md).

# PowerShell-Skript zur automatischen Aktualisierung von Devolutions Gateway

Dieses PowerShell-Skript ist dafür gedacht, als geplante Aufgabe registriert zu werden, die einmal täglich ausgeführt wird, um nach Updates zu suchen, sie herunterzuladen und anschließend zu installieren. Dieses Skript ist besonders nützlich, wenn mehrere Gateways verwendet werden, da es viel Zeit spart.

{% hint style="info" %}
Lesen Sie diese [GitHub](https://github.com/Devolutions/devolutions-gateway/blob/master/tools/updater/README.md)-Seite für weitere Details.
{% endhint %}

### Installieren

1. Laden Sie das Auto-Updater-[PowerShell-Skript](https://github.com/Devolutions/devolutions-gateway/blob/master/tools/updater/GatewayUpdater.ps1) herunter.
2. Öffnen Sie ein PowerShell-Terminal mit erhöhten Rechten.
3. Wechseln Sie in das Verzeichnis, das das Skript GatewayUpdater.ps1 enthält.
4. Führen Sie es mit dem Parameter `install` aus.

```powershell
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
```

### Ausführen

Standardmäßig wird die geplante Aufgabe jeden Tag um 3 Uhr morgens ausgeführt. Sie kann auch manuell mit dem folgenden Befehl ausgelöst werden: `& schtasks.exe /Run /TN "Devolutions Gateway Updater"`\
Der Status der geplanten Aufgabe kann anschließend abgefragt werden:

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

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

{% hint style="info" %}
Der Updater lädt das Installationsprogramm automatisch herunter, falls eine neue Version verfügbar ist, und prüft dann den Datei-Hash, bevor er es unbeaufsichtigt ausführt.
{% endhint %}

### Deinstallieren

{% hint style="info" %}
Dadurch wird die Registrierung der geplanten Aufgabe aufgehoben und das Skript GatewayUpdater.ps1 aus dem im Befehl verwendeten Pfad gelöscht.
{% endhint %}

1. Öffnen Sie ein PowerShell-Terminal.
2. Führen Sie das Skript GatewayUpdater.ps1 mit dem Parameter `uninstall` aus.

```powershell
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.
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell/de/devolutions-gateway-powershell/powershell-auto-updater-script-for-devolutions-gateway.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
