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

# Set-PSUAiTool

Set-PSUAiTool met à jour une définition d'outil d'IA existante dans PowerShell Universal, en modifiant ses métadonnées, ses rôles, son chemin de script ou son exposition MCP.

## SYNOPSIS

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

## SYNTAXE

```powershell
Set-PSUAiTool -Id <Int64> [-Name <String>] [-Description <String>] [-Authenticated <Boolean>] [-Roles <String[]>] [-ScriptFullPath <String>] [-DefaultMaxWaitTimeoutSeconds <Int32>] [-Environment <String>] [-Computer <String>] [-Mcp] [<ConnectionOptions>] [<CommonParameters>]
Set-PSUAiTool -AiTool <AiTool> [-Name <String>] [-Description <String>] [-Authenticated <Boolean>] [-Roles <String[]>] [-ScriptFullPath <String>] [-DefaultMaxWaitTimeoutSeconds <Int32>] [-Environment <String>] [-Computer <String>] [-Mcp] [<ConnectionOptions>] [<CommonParameters>]
```

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

## DESCRIPTION

Charge un outil d'IA par ID ou par objet de pipeline et ne met à jour que les champs fournis. `-Environment` et `-Computer` définissent la cible d'exécution par défaut ; les groupes d'ordinateurs prennent en charge `'<GroupName> (All)'` et `'<GroupName> (Any)'`. `-DefaultMaxWaitTimeoutSeconds` définit le délai d'attente par défaut des tâches d'outil ; omettez-le pour conserver la valeur actuelle.

## EXEMPLES

```powershell
Set-PSUAiTool -Id 5 -Description 'Ticket lookup and updates' -Authenticated $true -Roles HelpDesk,Admin -Mcp
Set-PSUAiTool -Id 5 -Environment '7.4' -Computer 'Agents (Any)' -DefaultMaxWaitTimeoutSeconds 60
```

## PARAMÈTRES

| Paramètre                       | Description                                                                                             |
| ------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `-Id`                           | ID numérique de l'outil à mettre à jour.                                                                |
| `-AiTool`                       | Objet d'outil à mettre à jour ; accepte l'entrée du pipeline.                                           |
| `-Name`                         | Nouveau nom de l'outil.                                                                                 |
| `-Description`                  | Nouvelle description.                                                                                   |
| `-Authenticated`                | Indique si l'authentification est obligatoire (`$true` ou `$false`).                                    |
| `-Roles`                        | Liste de remplacement des rôles autorisés à exécuter l'outil.                                           |
| `-ScriptFullPath`               | Nouveau chemin du script d'implémentation.                                                              |
| `-DefaultMaxWaitTimeoutSeconds` | Attente maximale par défaut des tâches d'outil, en secondes ; passer explicitement `$null` rétablit 30. |
| `-Environment`                  | Environnement d'exécution par défaut ; une chaîne vide l'efface.                                        |
| `-Computer`                     | Ordinateur ou groupe d'ordinateurs cible par défaut ; une chaîne vide l'efface.                         |
| `-Mcp`                          | Définit l'exposition par MCP.                                                                           |
| `-ComputerName`                 | URL ou nom d'hôte du serveur PSU cible (alias `-Uri`), et non la cible d'exécution de l'outil.          |
| `-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.AiTool`.

## PERMISSIONS

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