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

# New-UDCheckBox

New-UDCheckBox erstellt ein Kontrollkästchen-Steuerelement in PowerShell Universal zur Erfassung boolescher Eingaben, verwendbar eigenständig oder innerhalb von New-UDForm.

### Übersicht

Erstellt ein Kontrollkästchen.

### Syntax

```powershell
New-UDCheckBox [[-Label] <String>] [[-Icon] <Object>] [[-CheckedIcon] <Object>] [[-OnChange] <Endpoint>] [[-Style] <Hashtable>] [[-Disabled]] [[-Checked] <Boolean>] [[-ClassName] <String>] [[-LabelPlacement] <String>] [[-Id] <String>] [[-Size] <String>] [-Color <String>] [-Indeterminate] [-Aria <ScriptBlock>] [<CommonParameters>]
```

### Beschreibung

Erstellt ein Kontrollkästchen. Kontrollkästchen können in Formularen oder eigenständig verwendet werden.

### Parameter

#### -Label

Die Beschriftung, die neben dem Kontrollkästchen angezeigt wird.

```
Required?                    false
Position?                    1
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Icon

Das Symbol, das anstelle des Standardsymbols angezeigt wird. Verwenden Sie New-UDIcon, um ein Symbol zu erstellen.

```
Required?                    false
Position?                    2
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -CheckedIcon

Das Symbol, das anstelle des standardmäßigen Symbols für den aktivierten Zustand angezeigt wird. Verwenden Sie New-UDIcon, um ein Symbol zu erstellen.

```
Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -OnChange

Wird aufgerufen, wenn sich der Wert des Kontrollkästchens ändert. Die Variable $EventData enthält den aktuellen Wert des Kontrollkästchens.

```
Required?                    false
Position?                    4
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Style

Eine Hashtable mit Stilen, die auf das Kontrollkästchen angewendet werden.

```
Required?                    false
Position?                    5
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Disabled

Ob das Kontrollkästchen deaktiviert ist.

```
Required?                    false
Position?                    6
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Checked

Ob das Kontrollkästchen aktiviert ist.

```
Required?                    false
Position?                    7
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ClassName

Eine CSS-Klasse, die dem Kontrollkästchen zugewiesen wird.

```
Required?                    false
Position?                    8
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -LabelPlacement

Wo die Beschriftung platziert wird. Gültige Werte sind: "top","start","bottom","end"

```
Required?                    false
Position?                    8
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Id

Die ID der Komponente. Standardmäßig ist dies eine zufällige GUID.

```
Required?                    false
Position?                    9
Default value                ([Guid]::NewGuid()).ToString()
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Size

Die Größe des Kontrollkästchens. Gültige Werte sind: "small", "medium"

```
Required?                    false
Position?                    10
Default value                medium
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Color

Die Designfarbe, die auf diese Komponente angewendet wird

```
Required?                    false
Position?                    named
Default value                default
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Indeterminate

Ob sich das Kontrollkästchen in einem unbestimmten Zustand befindet. Dies ist nur ein visueller Zustand und wirkt sich nicht auf den Wert des Kontrollkästchens aus.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Aria

Ein Skriptblock mit `New-UDAriaAttribute`-Aufrufen, der ARIA- oder Rollenattribute für das Kontrollkästchen bereitstellt.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### Allgemeine Parameter

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

### Ausgaben

### Beispiele

#### Beispiel 1: Einfaches Kontrollkästchen

```powershell
New-UDCheckbox -Label 'Demo' -Id 'checkbox1'
```

Ein einfaches Kontrollkästchen.

#### Beispiel 2: Deaktiviertes Kontrollkästchen

```powershell
New-UDCheckbox -Label 'Demo' -Disabled -Id 'checkbox2'
```

Ein deaktiviertes Kontrollkästchen.

#### Beispiel 3: Aktiviertes Kontrollkästchen

```powershell
New-UDCheckbox -Label 'Demo' -Checked $true -Id 'checkbox3'
```

Ein aktiviertes Kontrollkästchen.

#### Beispiel 4: Kontrollkästchen mit benutzerdefinierten Symbolen

```powershell
New-UDCheckbox -Label 'Demo' -Icon (New-UDIcon -Icon 'user') -CheckedIcon (New-UDIcon -Icon 'check') -Id 'checkbox4'
```

Ein Kontrollkästchen mit benutzerdefinierten Symbolen.

#### Beispiel 5: Kontrollkästchen mit OnChange

```powershell
New-UDCheckbox -Label 'Demo' -OnChange {
    Show-UDToast -Title 'Checkbox' -Message $Body
} -Id 'checkbox5'
```

Ein Kontrollkästchen mit einem OnChange-Ereignis.

#### Beispiel 6: Kontrollkästchen mit Beschriftung oben

```powershell
New-UDCheckbox -Label 'Demo' -LabelPlacement 'top' -Id 'checkbox6'
```

Ein Kontrollkästchen mit der Beschriftung oben.

#### Beispiel 7: Kontrollkästchen mit Sekundärfarbe

```powershell
New-UDCheckbox -Label 'Demo' -Color 'secondary' -Id 'checkbox7'
```

Ein Kontrollkästchen mit der Sekundärfarbe.

#### Beispiel 8: Kontrollkästchen im unbestimmten Zustand

```powershell
New-UDCheckbox -Label 'Demo' -Id 'checkbox8' -Indeterminate
```

Ein Kontrollkästchen in einem unbestimmten Zustand.


---

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