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

# New-PSUWorkflowActivity

New-PSUWorkflowActivity erstellt eine Workflow-Aktivitätsdefinition in PowerShell Universal, die in einen Skriptblock einer Workflow-Definition eingebettet werden kann.

## SYNOPSIS

Erstellt eine Workflow-Aktivitätsdefinition.

## SYNTAX

```powershell
New-PSUWorkflowActivity -Type <String> [-Id <String>] [-Name <String>] [-ScriptFullPath <String>] [-TrueContinueAfterDecision <Boolean>] [-FalseContinueAfterDecision <Boolean>] [-Parameters <Hashtable>] [-Expressions <Hashtable>] [<ConnectionOptions>] [<CommonParameters>]
```

`<ConnectionOptions>`: `[-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]`. Aktivitätsmetadaten können zusätzliche dynamische Parameter für den gewählten `-Type` verfügbar machen.

## BESCHREIBUNG

Erstellt eine Aktivität für den Skriptblock `-Definition` von `New-PSUWorkflow`. `-Parameters` übergibt literale Aktivitätseigenschaften und `-Expressions` übergibt PowerShell-Ausdrücke, die zur Laufzeit ausgewertet werden. Containeraktivitäten, einschließlich `Sequence` und `Parallel`, unterstützen geschachtelte Aktivitäten. Das Cmdlet sucht Aktivitätsmetadaten, um den Typ zu prüfen und dynamische Parameter verfügbar zu machen; wenn die Auflösung dynamischer Parameter fehlschlägt, verwenden Sie stattdessen `-Parameters`.

## BEISPIEL

```powershell
New-PSUWorkflowActivity -Type Parallel -Activities {
    New-PSUWorkflowActivity -Type Script -ScriptFullPath 'C:\Repository\Test1.ps1'
    New-PSUWorkflowActivity -Type Script -ScriptFullPath 'C:\Repository\Test2.ps1'
}
```

## PARAMETER

| Parameter                     | Beschreibung                                                                                   |
| ----------------------------- | ---------------------------------------------------------------------------------------------- |
| `-Type`                       | Erforderlicher registrierter Workflow-Aktivitätstyp.                                           |
| `-Id`                         | Aktivitätskennung.                                                                             |
| `-Name`                       | Name der Aktivität.                                                                            |
| `-ScriptFullPath`             | Skriptpfad für eine skriptgestützte Aktivität.                                                 |
| `-TrueContinueAfterDecision`  | Gibt an, ob der Wahr-Zweig nach einer Entscheidung fortgesetzt wird (standardmäßig `$true`).   |
| `-FalseContinueAfterDecision` | Gibt an, ob der Falsch-Zweig nach einer Entscheidung fortgesetzt wird (standardmäßig `$true`). |
| `-Parameters`                 | Hashtable der literalen Werte der Aktivitätseigenschaften.                                     |
| `-Expressions`                | Hashtable der PowerShell-Ausdrücke zur Laufzeit.                                               |
| `-ComputerName`               | PSU-Server-URL oder Hostname für die Metadatensuche (Alias `-Uri`).                            |
| `-AppToken`                   | App-Token der Verwaltungs-API für die Metadatensuche.                                          |
| `-Credential`                 | Anmeldeinformationen 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.                                    |

## BERECHTIGUNGEN

Das Zugriffstoken erfordert `automation.workflows/read`, um dieses Cmdlet remote auszuführen. Das Cmdlet liest Aktivitätsmetadaten, um eine Workflowdefinition zu erstellen; es erstellt keinen Workflow auf dem Server.


---

# 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-psuworkflowactivity.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.
