> 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-psuaiagent.md).

# Set-PSUAiAgent

Set-PSUAiAgent met à jour un agent IA existant dans PowerShell Universal, en modifiant uniquement les champs que vous fournissez, comme les instructions, le modèle ou les outils.

## SYNOPSIS

Met à jour une définition d'agent IA existante.

## SYNTAXE

```powershell
Set-PSUAiAgent -Id <Int64> [-Name <String>] [-Description <String>] [-Instructions <String>] [-Model <String>] [-ApiKey <Variable>] [-Provider <AiProvider>] [-Endpoint <String>] [-Tool <String[]>] [-Role <String[]>] [-AvailableInChat] [<ConnectionOptions>] [<CommonParameters>]
Set-PSUAiAgent -AiAgent <AiAgent> [-Name <String>] [-Description <String>] [-Instructions <String>] [-Model <String>] [-ApiKey <Variable>] [-Provider <AiProvider>] [-Endpoint <String>] [-Tool <String[]>] [-Role <String[]>] [-AvailableInChat] [<ConnectionOptions>] [<CommonParameters>]
```

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

## DESCRIPTION

Charge un agent par ID ou par objet de pipeline et ne met à jour que les champs fournis. Fournir `-Tool` remplace la liste des outils autorisés ; `-AvailableInChat` détermine si l'agent apparaît dans les sélecteurs de clavardage de la console d'administration et des applis générées. Le fournisseur peut être `OpenAI`, `Anthropic` ou `Custom` ; lorsque le fournisseur obtenu est `Custom`, son point de terminaison doit être une URL absolue.

## EXEMPLES

```powershell
Set-PSUAiAgent -Id 12 -Instructions 'Escalate billing issues to humans.' -Tool GetInvoices,CreateTicket
Set-PSUAiAgent -Id 12 -AvailableInChat -Tool GetTickets,CreateTicket
```

## PARAMÈTRES

| Paramètre                | Description                                                                    |
| ------------------------ | ------------------------------------------------------------------------------ |
| `-Id`                    | ID numérique de l'agent à mettre à jour.                                       |
| `-AiAgent`               | Objet d'agent à mettre à jour ; accepte l'entrée du pipeline.                  |
| `-Name`                  | Nouveau nom de l'agent.                                                        |
| `-Description`           | Nouvelle description.                                                          |
| `-Instructions`          | Nouvelles instructions système.                                                |
| `-Model`                 | Nouvel identificateur de modèle.                                               |
| `-ApiKey`                | Variable PSU qui contient la clé d'API du fournisseur.                         |
| `-Provider`              | Fournisseur d'IA : `OpenAI`, `Anthropic` ou `Custom`.                          |
| `-Endpoint`              | URL absolue du fournisseur, obligatoire si le fournisseur obtenu est `Custom`. |
| `-Tool`                  | Liste de remplacement des noms d'outils autorisés (alias `-Tools`).            |
| `-Role`                  | Liste de remplacement des rôles autorisés (alias `-Roles`).                    |
| `-AvailableInChat`       | Définit la disponibilité dans l'interface de clavardage.                       |
| `-ComputerName`          | URL ou nom d'hôte du serveur cible (alias `-Uri`).                             |
| `-AppToken`              | Jeton d'application de l'API de gestion.                                       |
| `-Credential`            | Identifiants pour l'authentification de base 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

`PowerShellUniversal.Models.Intelligence.AiAgent`.

## PERMISSIONS

Le jeton d'accès requiert `intelligence.agents/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-psuaiagent.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.
