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

# New-PSUVariable

## ÜBERSICHT

Erstellt eine neue Variable in PSU.

## SYNTAX

### Value (Standard)

```
New-PSUVariable -Name <String> [-Value <Object>] [-Type <String>] [-Description <String>]
 [-DisableRunAsSupport] [-Database] [-Role <String[]>] [-Force] [-Scope <VariableScope>] [-Tag <Tag[]>]
 [-PasswordNotRequired] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>]
 [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]
```

### Secret

```
New-PSUVariable -Name <String> [-Value <Object>] [-InputObject <Object>] -Vault <String> [-Type <String>]
 [-Description <String>] [-DisableRunAsSupport] [-Database] [-Role <String[]>] [-Force]
 [-Scope <VariableScope>] [-Tag <Tag[]>] [-PasswordNotRequired] [-ComputerName <String>] [-AppToken <String>]
 [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]
```

### InputObject

```
New-PSUVariable -Name <String> [-InputObject <Object>] [-Type <String>] [-Description <String>]
 [-DisableRunAsSupport] [-Database] [-Role <String[]>] [-Force] [-Scope <VariableScope>] [-Tag <Tag[]>]
 [-PasswordNotRequired] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>]
 [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]
```

## BESCHREIBUNG

Erstellt eine neue Variable in PSU. Variablen sind in allen Skripten verfügbar, die innerhalb von PSU ausgeführt werden.

## BEISPIELE

### Beispiel 1

```
PS C:\> New-UAVariable -Name 'UserName' -Value 'Adam'
```

Erstellt eine neue Variable in PSU mit dem Namen \`UserName\`. Sie können die Variable $UserName in allen Ihren Skripten verwenden.

### Beispiel 2

```
PS C:\> New-UAVariable -Name 'UserName' -Value 'Adam' -Vault "Vault"
```

Erstellt eine neue Variable im Tresor mit dem Namen \`Vault\`. Der Wert der Variable wird nicht in PSU gespeichert und wird nur beim Ausführen von Skripten abgerufen.

## PARAMETER

### -AppToken

Ein App-Token für den Zugriff auf die PSU-API.

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

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

### -ComputerName

Die HTTP-Adresse des PSU-REST-API-Servers.

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

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

### -Description

Eine Beschreibung für diese Variable.

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

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

### -DisableRunAsSupport

Verhindert, dass eine Anmeldeinformation für die Run-As-Unterstützung verwendet wird.

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

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

### -InputObject

Ein Eingabeobjekt, das als Variable gespeichert wird.

```yaml
Type: Object
Parameter Sets: Secret, InputObject
Aliases:

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

### -Integrated

Führt den Befehl intern aus, anstatt die Management-API zu verwenden. Funktioniert nur, wenn das Skript 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

Der Name der Variable. Sie können darauf in Ihren Skripten genauso verweisen wie auf andere Variablen.

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

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

### -Type

Der .NET-Typ des Objekts .

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

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

### -UseDefaultCredentials

Standardanmeldeinformationen bei der Verbindung mit der Management-API verwenden

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

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

### -Value

Der Wert der Variable.

```yaml
Type: Object
Parameter Sets: Value, Secret
Aliases:

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

### -Vault

Der Tresor, in dem die Variable gespeichert wird.

```yaml
Type: String
Parameter Sets: Secret
Aliases:

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

### -Database

Speichert den Wert der Variable in der Datenbank.

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

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

### -Force

Überschreibt vorhandene Variablen mit demselben Namen.

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

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

### -Role

Die Rollen, die auf diese Variable zugreifen können.

```yaml
Type: String[]
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 bei der PowerShell Universal Management-API.

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

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

### -Scope

Der Variablenbereich für diese Variable. Änderungen an globalen Variablen führen zu einem Neustart der Ressourcen. Bei Variablen mit Skriptbereich ist dies nicht der Fall.

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

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

### -Tag

Tags für diese Variable.

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

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

### -TrustCertificate

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
```

### -PasswordNotRequired

Gibt an, dass für diese Variable kein Passwort erforderlich ist. Dies ist nützlich für Konten wie gruppenverwaltete Dienstkonten.

```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).

## EINGABEN

### Keine

## AUSGABEN

### System.Object

## HINWEISE

## VERWANDTE LINKS


---

# 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/new-psuvariable.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.
