> 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

### Id

```
Set-PSUAiTool [-Id] <Int64> [-Name <String>] [-Description <String>] [-Authenticated <Boolean>]
 [-Roles <String[]>] [-ScriptFullPath <String>] [-Mcp] [-ComputerName <String>] [-AppToken <String>]
 [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]
```

### AiTool

```
Set-PSUAiTool [-AiTool] <AiTool> [-Name <String>] [-Description <String>] [-Authenticated <Boolean>]
 [-Roles <String[]>] [-ScriptFullPath <String>] [-Mcp] [-ComputerName <String>] [-AppToken <String>]
 [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]
```

## DESCRIPTION

Charge un outil d'IA par Id ou par objet de pipeline et applique uniquement les champs fournis à l'applet de commande. Utilisez cette applet de commande pour modifier les métadonnées, l'autorisation, les chemins de script ou l'exposition MCP.

## EXEMPLES

### Exemple 1

```powershell
PS C:\> Set-PSUAiTool -Id 5 -Description "Ticket lookup and updates" -Authenticated $true -Roles HelpDesk,Admin -Mcp
```

Met à jour l'outil d'IA 5 avec une nouvelle description, une nouvelle liste de rôles et une nouvelle exposition MCP.

## PARAMÈTRES

### -AiTool

Spécifie l'outil d'IA à cibler.

```yaml
Type: AiTool
Parameter Sets: AiTool
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -AppToken

Spécifie le jeton d'appli à utiliser lors de l'authentification à l'API de gestion de PowerShell Universal.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Authenticated

Exige des utilisateurs authentifiés avant que la ressource puisse être accédée ou invoquée.

```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ComputerName

Spécifie l'URL ou le nom d'hôte de l'instance PowerShell Universal cible. Les noms d'hôte simples sont normalisés en une URL `http://<host>:5000`.

```yaml
Type: String
Parameter Sets: (All)
Aliases: Uri

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Cookies

Réutilise et conserve les témoins d'authentification pour la session PowerShell actuelle.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Credential

Spécifie les identifiants à utiliser pour l'authentification de base auprès de l'API de gestion de PowerShell Universal.

```yaml
Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Description

Spécifie une description pour la ressource.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Id

Spécifie l'Id numérique de la ressource.

```yaml
Type: Int64
Parameter Sets: Id
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Integrated

Utilise le client de gestion intégré en cours de processus lorsque l'applet de commande s'exécute dans PowerShell Universal.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Mcp

Expose l'outil d'IA via le Model Context Protocol (MCP).

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Name

Spécifie le nom de la ressource.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Roles

Spécifie un ou plusieurs rôles autorisés à invoquer l'outil d'IA.

```yaml
Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ScriptFullPath

Spécifie le chemin complet vers le script PowerShell qui implémente l'outil d'IA.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -TrustCertificate

Permet les connexions à des serveurs dont les certificats TLS ne sont pas approuvés.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -UseDefaultCredentials

Utilise les identifiants Windows actuels lors de l'authentification auprès de l'API de gestion.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### Paramètres communs

Cette applet de commande prend en charge les paramètres communs : -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable et -ProgressAction. Pour plus d'informations, voir [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## ENTRÉES

### PowerShellUniversal.Models.Intelligence.AiTool

## SORTIES

### System.Object

## NOTES

## LIENS CONNEXES

## 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]
Set-PSUAiTool -AiTool <AiTool> [-Name <String>] [-Description <String>] [-Authenticated <Boolean>] [-Roles <String[]>] [-ScriptFullPath <String>] [-DefaultMaxWaitTimeoutSeconds <Int32>] [-Environment <String>] [-Computer <String>] [-Mcp]
```

## DESCRIPTION

Met à jour uniquement les champs fournis. `-Environment` et `-Computer` définissent la cible d'exécution par défaut de l'outil ; 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.

## EXEMPLE

```powershell
Set-PSUAiTool -Id 5 -Environment '7.4' -Computer 'Agents (Any)' -DefaultMaxWaitTimeoutSeconds 60
```


---

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