> 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/da/devolutions-gateway-powershell/powershell-auto-updater-script-for-devolutions-gateway.md).

# PowerShell auto-updater script for Devolutions Gateway

Installér en PowerShell planlagt opgave at automatisk kontrollerer for, downloader, og installerer Devolutions Gateway opdateringer på tværs af flere gateways.

Denne PowerShell script er meant til være registered som en planlagt opgave at kører én gang en dag at kontrollere for opdateringer, download og derefter install dem. Denne script er especially useful når ved hjælp af flere gateways som den gemmer en lot af klokkeslæt.

{% hint style="info" %}
Læs denne [GitHub](https://github.com/Devolutions/devolutions-gateway/blob/master/tools/updater/README.md) side for flere detaljer.
{% endhint %}

### Installing

1. Download auto-updater [PowerShell script](https://github.com/Devolutions/devolutions-gateway/blob/master/tools/updater/GatewayUpdater.ps1).
2. Åbn en elevated PowerShell terminal.
3. Flyt til mappen der indeholder GatewayUpdater.ps1 script.
4. Kør den ved hjælp af `install` parameter.

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

### Running

Som standard, planlagt opgave vil run hver dag ved 3AM. Den kan også være manuelt triggered af ved hjælp af følgende kommando: `& schtasks.exe /Run /TN "Devolutions Gateway Updater"`\
Statussen af planlagt opgave kan derefter være queried:

```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" %}
Updater automatisk downloader installer hvis der er en ny version er tilgængelig, derefter kontrollerer filen hash før kørende den silently.
{% endhint %}

### Uninstalling

{% hint style="info" %}
Denne vil unregister planlagt opgave og delete GatewayUpdater.ps1 script fra stien brugt i kommandoen.
{% endhint %}

1. Åbn en PowerShell terminal.
2. Kør GatewayUpdater.ps1 script med `uninstall` parameter.

```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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
