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

# New-PSUEnvironment

New-PSUEnvironment erstellt eine PowerShell-Ausführungsumgebung in PowerShell Universal und definiert dabei den Runspace, die Module und das Startskript.

## SYNOPSIS

Erstellt eine PowerShell Universal-Ausführungsumgebung.

## SYNTAX

```powershell
New-PSUEnvironment -Name <String> [-Version <String>] [-Type <EnvironmentType>] [-Path <String>] [-Arguments <String>] [-Modules <String[]>] [-Variables <String[]>] [-PSModulePath <String[]>] [-StartupScript <String[]>] [-PersistentRunspace] [-RunspaceRecycling] [-MaxRunspaces <Int32>] [-MaxVirtualMemory <Int64>] [-RunspaceSaturationWarningThresholdPercent <Int32>] [-RunspaceSaturationWarningDurationSeconds <Int32>] [-RecycleSchedule <String>] [-Credential <Variable>] [-Description <String>] [-DisableImplicitWinCompat] [-Minimal] [-Disabled] [-ProcessStartupScript <String>] [-EnableDebugger] [-Verb <String>] [-PowerShellVersion <String>] [-Virtual] [-ContainerImageUrl <String>] [-ContainerImageTag <String>] [-ContainerPull] [<ConnectionOptions>] [<CommonParameters>]
```

`<ConnectionOptions>`: `[-ComputerName <String>] [-AppToken <String>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]`. Hier ist `-Credential` eine PSU-Anmeldeinformationsvariable für die Ausführung und keine Anmeldeinformation der Verwaltungs-API.

## BESCHREIBUNG

Erstellt eine Umgebung für APIs, Skripts, Apps und Sicherheitsprozesse. `-Type` akzeptiert `Custom`, `WindowsPowerShell`, `PowerShell7`, `Isolated` oder `Container`. Für `Isolated` akzeptiert `-PowerShellVersion` eine installierte Version oder einen Multi-pwsh-Selektor wie `stable`, `preview`, `lts` oder `7.4`; `-Virtual` aktiviert eine verwaltete virtuelle Multi-pwsh-Umgebung. Die Containeroptionen konfigurieren die Image-URL, das Tag und ob das Image heruntergeladen wird. `-EnableDebugger` wird aus Kompatibilitätsgründen beibehalten, ist aber nicht mehr erforderlich und gibt eine Warnung aus.

## BEISPIEL

```powershell
New-PSUEnvironment -Name 'Isolated 7.4' -Type Isolated -PowerShellVersion '7.4' -Virtual
```

## PARAMETER

| Parameter                                    | Beschreibung                                                                                 |
| -------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `-Name`                                      | Erforderlicher Umgebungsname.                                                                |
| `-Version`                                   | Versionskennung der Umgebung; standardmäßig ihr Name.                                        |
| `-Type`                                      | Umgebungstyp: `Custom`, `WindowsPowerShell`, `PowerShell7`, `Isolated` oder `Container`.     |
| `-Path`                                      | Pfad der ausführbaren Datei der Umgebung.                                                    |
| `-Arguments`                                 | Zusätzliche Prozessargumente.                                                                |
| `-Modules`                                   | Für die Umgebung konfigurierte Module.                                                       |
| `-Variables`                                 | Namen der PSU-Variablen, die der Umgebung zur Verfügung stehen; standardmäßig `*`.           |
| `-PSModulePath`                              | Zusätzliche PowerShell-Modulpfade.                                                           |
| `-StartupScript`                             | Skripts, die beim Start von Runspaces ausgeführt werden.                                     |
| `-PersistentRunspace`                        | Aktiviert einen persistenten Runspace.                                                       |
| `-RunspaceRecycling`                         | Aktiviert das Recycling von Runspaces.                                                       |
| `-MaxRunspaces`                              | Maximale Anzahl von Runspaces (Standard 25).                                                 |
| `-MaxVirtualMemory`                          | Maximaler virtueller Arbeitsspeicher in MB; für die Speicherung in Bytes umgerechnet.        |
| `-RunspaceSaturationWarningThresholdPercent` | Warnschwellenwert für die Runspace-Sättigung in Prozent (Standard 80).                       |
| `-RunspaceSaturationWarningDurationSeconds`  | Dauer der Sättigungswarnung in Sekunden (Standard 30).                                       |
| `-RecycleSchedule`                           | Planung für das Recycling von Runspaces.                                                     |
| `-Credential`                                | PSU-Anmeldeinformationsvariable für die Ausführung, kein `PSCredential` der Verwaltungs-API. |
| `-Description`                               | Beschreibung der Umgebung.                                                                   |
| `-DisableImplicitWinCompat`                  | Deaktiviert die implizite Windows-Kompatibilität.                                            |
| `-Minimal`                                   | Aktiviert einen minimalen Umgebungsstart.                                                    |
| `-Disabled`                                  | Erstellt die Umgebung deaktiviert.                                                           |
| `-ProcessStartupScript`                      | Skript, das beim Prozessstart ausgeführt wird.                                               |
| `-EnableDebugger`                            | Alter Kompatibilitätsschalter; gibt jetzt nur noch eine Warnung aus.                         |
| `-Verb`                                      | Verb, mit dem die ausführbare Datei gestartet wird.                                          |
| `-PowerShellVersion`                         | Installierte PowerShell-Version oder Multi-pwsh-Selektor für isolierte Umgebungen.           |
| `-Virtual`                                   | Aktiviert eine verwaltete virtuelle Umgebung.                                                |
| `-ContainerImageUrl`                         | URL des Containerimages.                                                                     |
| `-ContainerImageTag`                         | Tag des Containerimages.                                                                     |
| `-ContainerPull`                             | Lädt das konfigurierte Containerimage herunter.                                              |
| `-ComputerName`                              | URL oder Hostname des Ziel-PSU-Servers (Alias `-Uri`).                                       |
| `-AppToken`                                  | App-Token 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 `settings.environments/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-psuenvironment.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.
