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

# Set-PSUEnvironment

Set-PSUEnvironment aktualisiert eine vorhandene Ausführungsumgebung in PowerShell Universal, die über Id oder Pipeline-Objekt identifiziert wird, und ändert deren Pfad.

## SYNOPSIS

Aktualisiert eine vorhandene Ausführungsumgebung.

## SYNTAX

### Id

```
Set-PSUEnvironment [-Id] <Int64> [-Name <String>] [-Path <String>] [-Arguments <String>]
 [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials]
 [-Integrated] [-TrustCertificate] [-Cookies] [<CommonParameters>]
```

### Environment

```
Set-PSUEnvironment [-Environment] <ExecutionEnvironment> [-Name <String>] [-Path <String>]
 [-Arguments <String>] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>]
 [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]
```

## DESCRIPTION

Aktualisiert eine vorhandene Ausführungsumgebung anhand der Id oder durch Übergabe eines Umgebungsobjekts über die Pipeline.

## EXAMPLES

### Beispiel 1

```powershell
PS C:\> Set-PSUEnvironment -Id 3 -Name "PowerShell 7" -Path "C:\\Program Files\\PowerShell\\7\\pwsh.exe"
```

Aktualisiert die Umgebung 3 so, dass sie auf eine ausführbare Programmdatei von PowerShell 7 verweist.

## PARAMETERS

### -AppToken

Gibt das App-Token an, das bei der Authentifizierung an der PowerShell Universal-Verwaltungs-API verwendet werden soll.

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

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

### -Arguments

Gibt zusätzliche Argumente an, die an die ausführbare Programmdatei oder den Prozess übergeben werden.

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

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

### -ComputerName

Gibt die URL oder den Hostnamen der PowerShell Universal-Zielinstanz an. Reine Hostnamen werden zu einer `http://<host>:5000`-URL normalisiert.

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

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

### -Environment

Gibt die zu verwendende Ausführungsumgebung an.

```yaml
Type: ExecutionEnvironment
Parameter Sets: Environment
Aliases:

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

### -Id

Gibt die numerische Id der Ressource an.

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

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

### -Integrated

Verwendet den prozessinternen integrierten Verwaltungsclient, wenn das Cmdlet innerhalb von PowerShell Universal ausgeführt wird.

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

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

### -Name

Gibt den Namen der Ressource an.

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

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

### -Path

Gibt den Pfad an, der für die Ressource verwendet werden soll.

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

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

### -UseDefaultCredentials

Gibt an, ob beim Verbinden mit PowerShell Universal die Standardanmeldeinformationen verwendet werden sollen. Erfordert, dass die Windows-Authentifizierung aktiviert ist.

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

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

### -Credential

Anmeldeinformationen für die Anmeldung an der PowerShell Universal-Verwaltungs-API.

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

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

### -TrustCertificate

Gibt an, ob das Cmdlet Zertifikatsprobleme ignorieren soll.

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

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

### -Cookies

Verwendet und speichert Authentifizierungs-Cookies für die aktuelle PowerShell-Sitzung.

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

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

### CommonParameters

Dieses Cmdlet unterstützt die allgemeinen Parameter: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable und -ProgressAction. Weitere Informationen finden Sie unter [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### PowerShellUniversal.ExecutionEnvironment

## OUTPUTS

### System.Object

## NOTES

## RELATED LINKS

## SYNOPSIS

Aktualisiert eine vorhandene Ausführungsumgebung.

## SYNTAX

```powershell
Set-PSUEnvironment -Id <Int64> [-Name <String>] [-Path <String>] [-Arguments <String>] [-Type <EnvironmentType>] [-PowerShellVersion <String>] [-Virtual]
Set-PSUEnvironment -Environment <ExecutionEnvironment> [-Name <String>] [-Path <String>] [-Arguments <String>] [-Type <EnvironmentType>] [-PowerShellVersion <String>] [-Virtual]
```

## DESCRIPTION

Aktualisiert eine Umgebung anhand der ID oder eines Pipeline-Objekts. Für `-Type Isolated` akzeptiert `-PowerShellVersion` installierte Versionen sowie Multi-pwsh-Selektoren (`stable`, `preview`, `lts` oder einen major.minor-Selektor). Verwenden Sie `-Virtual`, um eine verwaltete virtuelle Multi-pwsh-Umgebung zu nutzen.

## EXAMPLE

```powershell
Set-PSUEnvironment -Id 3 -Type Isolated -PowerShellVersion stable -Virtual
```


---

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