> 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/de/powershell-befehle/new-psuaitool.md).

# New-PSUAiTool

New-PSUAiTool registriert ein neues KI-Tool, das auf einem PowerShell-Skript in PowerShell Universal basiert, und stellt es optional über MCP bereit.

## SYNOPSIS

Erstellt eine neue KI-Tool-Definition.

## SYNTAX

```powershell
New-PSUAiTool -Name <String> -ScriptFullPath <String> [-Description <String>] [-Authenticated] [-Role <String[]>] [-Mcp] [-DefaultMaxWaitTimeoutSeconds <Int32>] [-Environment <String>] [-Computer <String>] [<ConnectionOptions>] [<CommonParameters>]
```

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

## BESCHREIBUNG

Erstellt ein KI-Tool, das von einem PowerShell-Skript unterstützt wird. KI-Agenten können das Tool aufrufen; `-Mcp` macht es außerdem über das Model Context Protocol verfügbar. Toolnamen müssen eindeutig sein (ohne Berücksichtigung der Groß-/Kleinschreibung). `-Environment` und `-Computer` legen das standardmäßige Ausführungsziel fest; eine Computergruppe kann `'<GroupName> (All)'` oder `'<GroupName> (Any)'` verwenden. Die standardmäßige maximale Wartezeit für Tool-Jobs beträgt 30 Sekunden.

## BEISPIELE

```powershell
New-PSUAiTool -Name GetTickets -Description 'Query ticket data' -ScriptFullPath 'C:\ProgramData\UniversalAutomation\Repository\scripts\GetTickets.ps1' -Authenticated -Role HelpDesk,Admin -Mcp
New-PSUAiTool -Name GetTickets -ScriptFullPath 'C:\Repository\GetTickets.ps1' -Environment '7.4' -Computer 'Agents (Any)' -DefaultMaxWaitTimeoutSeconds 60 -Mcp
```

## PARAMETER

| Parameter                       | Beschreibung                                                                                                                |
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `-Name`                         | Erforderlicher eindeutiger Toolname.                                                                                        |
| `-ScriptFullPath`               | Erforderlicher vollständiger Pfad zum implementierenden Skript.                                                             |
| `-Description`                  | Beschreibung der Funktion des Tools.                                                                                        |
| `-Authenticated`                | Erfordert eine Authentifizierung, um das Tool auszuführen.                                                                  |
| `-Role`                         | Rollen, die es ausführen dürfen.                                                                                            |
| `-Mcp`                          | Macht das Tool über MCP verfügbar.                                                                                          |
| `-DefaultMaxWaitTimeoutSeconds` | Standardmäßige maximale Wartezeit für Tool-Jobs, in Sekunden (standardmäßig 30); einzelne Aufrufe können sie überschreiben. |
| `-Environment`                  | Standardmäßige Ausführungsumgebung.                                                                                         |
| `-Computer`                     | Standardmäßiger Zielcomputer oder standardmäßige Computergruppe.                                                            |
| `-ComputerName`                 | URL oder Hostname des Ziel-PSU-Servers (Alias `-Uri`), nicht das Ausführungsziel des Tools.                                 |
| `-AppToken`                     | App-Token der Verwaltungs-API.                                                                                              |
| `-Credential`                   | Anmeldeinformationen für die Basic-Authentifizierung der Verwaltungs-API.                                                   |
| `-UseDefaultCredentials`        | Verwendet die aktuellen Windows-Anmeldeinformationen.                                                                       |
| `-Integrated`                   | Verwendet den prozessinternen Verwaltungsclient.                                                                            |
| `-TrustCertificate`             | Ignoriert Fehler bei der Zertifikatsvalidierung.                                                                            |
| `-Cookies`                      | Verwendet die Authentifizierungscookies der Sitzung erneut.                                                                 |

## EINGABEN

Keine.

## AUSGABEN

`PowerShellUniversal.Models.Intelligence.AiTool`.

## BERECHTIGUNGEN

Das Zugriffstoken erfordert `intelligence.tools/create`, um dieses Cmdlet remote auszuführen.


---

# 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/de/powershell-befehle/new-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.
