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

# New-UDList

New-UDList erstellt einen vertikalen Listencontainer in PowerShell Universal für Text- oder Bildeinträge, die mit New-UDListItem hinzugefügt werden – ideal für die Drawer-Navigation.

### Übersicht

Listen sind fortlaufende, vertikale Verzeichnisse von Text oder Bildern.

### Syntax

```powershell
New-UDList [[-Id] <String>] [[-Children] <ScriptBlock>] [[-SubHeader] <String>] [[-ClassName] <String>] [-Dense] [[-Sx] <Hashtable>] [[-AlignItems] <String>] [<CommonParameters>]
```

### Beschreibung

Erstellt eine Liste. Verwenden Sie New-UDListItem, um der Liste neue Elemente hinzuzufügen. Listen eignen sich gut für Links in UDDrawers.

### Parameter

#### -Id

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

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

#### -Children

Die Elemente in der Liste.

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

#### -SubHeader

Text, der innerhalb der Unterüberschrift angezeigt wird.

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

#### -ClassName

Eine CSS-Klasse, die auf die Liste angewendet wird.

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

#### -Dense

Ob die Liste kompakt (dense) ist.

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

#### -Sx

Eine Hashtable mit Stilen, die auf diese Komponente angewendet werden.

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

#### -AlignItems

```
Required?                    false
Position?                    6
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: Einfache Liste

```powershell
New-UDList -Content {
   New-UDListItem -Label 'Inbox' -Icon (New-UDIcon -Icon envelope -Size 3x) -SubTitle 'New Stuff'
   New-UDListItem -Label 'Drafts' -Icon (New-UDIcon -Icon edit -Size 3x) -SubTitle "Stuff I'm working on "
   New-UDListItem -Label 'Trash' -Icon (New-UDIcon -Icon trash -Size 3x) -SubTitle 'Stuff I deleted'
   New-UDListItem -Label 'Spam' -Icon (New-UDIcon -Icon bug -Size 3x) -SubTitle "Stuff I didn't want"
} -Id 'list1'
```

Eine einfache Liste von Elementen mit Symbolen und einem Untertitel.

#### Beispiel 2: Kompakte Liste

```powershell
New-UDList -Content {
   New-UDListItem -Label 'Inbox'
   New-UDListItem -Label 'Drafts'
   New-UDListItem -Label 'Trash'
   New-UDListItem -Label 'Spam'
} -Id 'list2' -Dense
```

Eine kompakte Liste.

#### Beispiel 3: OnClick

```powershell
New-UDList -Content {
   New-UDListItem -Label 'Inbox' -Icon (New-UDIcon -Icon envelope -Size 3x) -SubTitle 'New Stuff' -OnClick {
       Show-UDToast -Message 'Inbox Clicked'
   }
   New-UDListItem -Label 'Drafts' -Icon (New-UDIcon -Icon edit -Size 3x) -SubTitle "Stuff I'm working on " -OnClick {
       Show-UDToast -Message 'Drafts Clicked'
   }
} -Id 'list3'
```

Auf Klicks auf Listenelemente reagieren.

#### Beispiel 4: Sekundäre Aktion

```powershell
New-UDList -Content {
   New-UDListItem -Label 'Inbox' -Icon (New-UDIcon -Icon envelope -Size 3x) -SubTitle 'New Stuff' -SecondaryAction {
       New-UDButton -Text 'Secondary Action'
   }
   New-UDListItem -Label 'Drafts' -Icon (New-UDIcon -Icon edit -Size 3x) -SubTitle "Stuff I'm working on " -SecondaryAction {
       New-UDButton -Text 'Secondary Action'
   }
} -Id 'list4'
```

Auf sekundäre Aktionen bei Listenelementen reagieren.

#### Beispiel 5: Verschachtelte Listenelemente

```powershell
New-UDList -Content {
   New-UDListItem -Label 'Inbox' -Icon (New-UDIcon -Icon envelope -Size 3x) -SubTitle 'New Stuff' -Children {
       New-UDListItem -Label 'Inbox Item 1' -Nested
       New-UDListItem -Label 'Inbox Item 2' -Nested
       New-UDListItem -Label 'Inbox Item 3' -Nested
   }
   New-UDListItem -Label 'Drafts' -Icon (New-UDIcon -Icon edit -Size 3x) -SubTitle "Stuff I'm working on " -Children {
       New-UDListItem -Label 'Drafts Item 1' -Nested
       New-UDListItem -Label 'Drafts Item 2' -Nested
       New-UDListItem -Label 'Drafts Item 3' -Nested
   }
} -Id 'list5'
```

Verschachtelte Listenelemente erstellen.

#### Beispiel 6: Switch

```powershell
New-UDList -Content {
   New-UDListItem -Label 'Inbox' -Icon (New-UDIcon -Icon envelope -Size 3x) -SubTitle 'New Stuff' -Switch (New-UDSwitch) -SwitchAlignment 'right'
   New-UDListItem -Label 'Drafts' -Icon (New-UDIcon -Icon edit -Size 3x) -SubTitle "Stuff I'm working on " -Switch (New-UDSwitch) -SwitchAlignment 'right'
   New-UDListItem -Label 'Trash' -Icon (New-UDIcon -Icon trash -Size 3x) -SubTitle 'Stuff I deleted' -Switch (New-UDSwitch) -SwitchAlignment 'right'
   New-UDListItem -Label 'Spam' -Icon (New-UDIcon -Icon bug -Size 3x) -SubTitle "Stuff I didn't want" -Switch (New-UDSwitch) -SwitchAlignment 'right'
} -Id 'list6'
```

Ein Listenelement mit einem Switch erstellen.

#### Beispiel 7: CheckBox

```powershell
New-UDList -Content {
   New-UDListItem -Label 'Inbox' -SubTitle 'New Stuff' -CheckBox (New-UDCheckbox) -CheckBoxAlignment 'left'
   New-UDListItem -Label 'Drafts' -SubTitle "Stuff I'm working on " -CheckBox (New-UDCheckbox) -CheckBoxAlignment 'left'
   New-UDListItem -Label 'Trash' -SubTitle 'Stuff I deleted' -CheckBox (New-UDCheckbox) -CheckBoxAlignment 'left'
   New-UDListItem -Label 'Spam' -SubTitle "Stuff I didn't want" -CheckBox (New-UDCheckbox) -CheckBoxAlignment 'left'
} -Id 'list7'
```

Ein Listenelement mit einer Checkbox erstellen.

#### Beispiel 8: Links

```powershell
New-UDList -Content {
   New-UDListItem -Label 'Inbox' -SubTitle 'New Stuff' -Href 'https://devolutions.net/powershell-universal/' -OpenInNewWindow
   New-UDListItem -Label 'Drafts' -SubTitle "Stuff I'm working on " -Href 'https://powershellgallery.com' -OpenInNewWindow
   New-UDListItem -Label 'Trash' -SubTitle 'Stuff I deleted' -Href 'https://github.com/powershell/powershell' -OpenInNewWindow
   New-UDListItem -Label 'Spam' -SubTitle "Stuff I didn't want"
} -Id 'list7'
```

Ein Listenelement mit Links erstellen


---

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