> 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-universal/fr/commandes-powershell/set-psutrigger.md).

# Set-PSUTrigger

Set-PSUTrigger met à jour un déclencheur d'automatisation existant dans PowerShell Universal, y compris son type d'événement, son script, son tableau de bord et son environnement.

## SYNOPSIS

Met à jour un déclencheur d'automatisation existant.

## SYNTAXE

```powershell
Set-PSUTrigger -Id <Int64> [-Name <String>] [-EventType <EventType>] [-Script <String>] [-Scripts <String[]>] [-TriggerScript <String>] [-Environment <String>] [-Dashboard <String>] [-Parameters <Hashtable>] [<ConnectionOptions>] [<CommonParameters>]
Set-PSUTrigger -Trigger <Trigger> [-Name <String>] [-EventType <EventType>] [-Script <String>] [-Scripts <String[]>] [-TriggerScript <String>] [-Environment <String>] [-Dashboard <String>] [-Parameters <Hashtable>] [<ConnectionOptions>] [<CommonParameters>]
```

`<ConnectionOptions>`: `[-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]`.

## DESCRIPTION

Met à jour un déclencheur par ID ou par objet de pipeline. Seuls les champs fournis changent. `-Scripts` remplace sa sélection de scripts et prend en charge plusieurs scripts ; `-Script` sélectionne un seul script à la place. `-Parameters` transmet une table de hachage au script de déclencheur lorsqu'il s'exécute et résout les paramètres déclarés de ce script. Un `-Name` vide est rejeté.

## EXEMPLES

```powershell
Set-PSUTrigger -Id 4 -Name 'Server Startup' -EventType ServerStarted
Set-PSUTrigger -Id 4 -Scripts 'Build.ps1','Deploy.ps1' -Parameters @{ Channel = 'ops' }
```

## PARAMÈTRES

| Paramètre                | Description                                                                     |
| ------------------------ | ------------------------------------------------------------------------------- |
| `-Id`                    | ID numérique du déclencheur.                                                    |
| `-Trigger`               | Objet de déclencheur ; accepte l'entrée du pipeline.                            |
| `-Name`                  | Nouveau nom de déclencheur non vide.                                            |
| `-EventType`             | Type d'événement qui active le déclencheur.                                     |
| `-Script`                | Sélectionne un script associé et efface la sélection de plusieurs scripts.      |
| `-Scripts`               | Sélectionne plusieurs scripts associés et efface la sélection d'un seul script. |
| `-TriggerScript`         | Chemin du script exécuté lorsque l'événement se produit.                        |
| `-Environment`           | Environnement d'exécution.                                                      |
| `-Dashboard`             | Nom de l'appli associée.                                                        |
| `-Parameters`            | Table de hachage des paramètres du script de déclencheur.                       |
| `-ComputerName`          | URL ou nom d'hôte du serveur PSU cible (alias `-Uri`).                          |
| `-AppToken`              | Jeton d'application de l'API de gestion.                                        |
| `-Credential`            | Identifiants de l'API de gestion.                                               |
| `-UseDefaultCredentials` | Utilise les identifiants Windows actuels.                                       |
| `-Integrated`            | Utilise le client de gestion dans le processus.                                 |
| `-TrustCertificate`      | Ignore les erreurs de validation du certificat.                                 |
| `-Cookies`               | Réutilise les témoins d'authentification de la session.                         |

## ENTRÉES

`UniversalAutomation.Trigger`.

## PERMISSIONS

Le jeton d'accès requiert `automation.triggers/update` pour exécuter cette applet de commande à distance.


---

# 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-universal/fr/commandes-powershell/set-psutrigger.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.
