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

# Script de actualización automática de PowerShell para Devolutions Gateway

Este script de PowerShell está pensado para registrarse como una tarea programada que se ejecuta una vez al día para comprobar si hay actualizaciones, descargarlas y luego instalarlas. Este script resulta especialmente útil cuando se utilizan varios gateways, ya que ahorra mucho tiempo.

{% hint style="info" %}
Consulte esta página de [GitHub](https://github.com/Devolutions/devolutions-gateway/blob/master/tools/updater/README.md) para obtener más detalles.
{% endhint %}

### Instalación

1. Descargue el [script de PowerShell](https://github.com/Devolutions/devolutions-gateway/blob/master/tools/updater/GatewayUpdater.ps1) de actualización automática.
2. Abra un terminal de PowerShell con privilegios elevados.
3. Vaya al directorio que contiene el script GatewayUpdater.ps1.
4. Ejecútelo utilizando el parámetro `install`.

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

### Ejecución

De forma predeterminada, la tarea programada se ejecutará todos los días a las 3:00. También se puede activar manualmente mediante el siguiente comando: `& schtasks.exe /Run /TN "Devolutions Gateway Updater"`\
A continuación, se puede consultar el estado de la tarea programada:

```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" %}
El actualizador descarga automáticamente el instalador si hay una nueva versión disponible y, a continuación, comprueba el hash del fichero antes de ejecutarlo de forma silenciosa.
{% endhint %}

### Desinstalación

{% hint style="info" %}
Esto anulará el registro de la tarea programada y eliminará el script GatewayUpdater.ps1 de la ruta utilizada en el comando.
{% endhint %}

1. Abra un terminal de PowerShell.
2. Ejecute el script GatewayUpdater.ps1 con el parámetro `uninstall`.

```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/es/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.
