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

# New-UDAvatar

### Übersicht

Erstellt einen neuen Avatar.

### Syntax

```powershell
New-UDAvatar [[-Id] <String>] [[-Image] <String>] [[-Alt] <String>] [[-ClassName] <String>] [[-Variant] <String>] [[-Sx] <Object>] [[-Children] <ScriptBlock>] [<CommonParameters>]
```

### Beschreibung

Erstellt einen neuen Avatar. Ein Avatar ist typischerweise ein Bild eines Benutzers.

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

#### -Image

Die URL eines Bildes, das im Avatar angezeigt werden soll.

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

#### -Alt

Der Alt-Text, der dem Avatar zugewiesen wird.

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

#### -ClassName

Klassen, die der Avatar-Komponente zugewiesen werden.

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

#### -Variant

Der Variantentyp des Avatars. Gültige Werte sind: "square", "rounded"

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

#### -Sx Die Eigenschaft sx ermöglicht es Ihnen, benutzerdefinierte CSS-Stile zu definieren, die auf die Komponente angewendet werden.Required?                    falsePosition?                    6Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-ChildrenDer Inhalt, der innerhalb des Avatars angezeigt werden soll.Required?                    falsePosition?                    7Default value                { "A" }Accept pipeline input?       falseAliasesAccept wildcard characters?  false    \<CommonParameters>        This cmdlet supports the common parameters: Verbose, Debug,        ErrorAction, ErrorVariable, WarningAction, WarningVariable,        OutBuffer, PipelineVariable, and OutVariable. For more information, see        about\_CommonParameters (<https://go.microsoft.com/fwlink/?LinkID=113216).Ausgaben--------------------------> BEISPIEL 1 --------------------------PS >New-UDAvatar -Alt "Remy Sharp" -Image "/assets/logo.png"Basic avatar|Displays a basic avatar with an image.-------------------------- EXAMPLE 2 --------------------------PS >New-UDAvatar -Alt "Remy Sharp" -Content { "B" } -Variant squareSquare avatar|Displays a square avatar with an image.-------------------------- EXAMPLE 3 --------------------------PS >New-UDAvatar -Alt "Remy Sharp" -Content {PS >   "A"PS > } -Sx @{PS >   borderRadius = '50%'PS > }Avatar with text|Displays an avatar with text and custom CSS styles.-------------------------- EXAMPLE 4 --------------------------PS >New-UDAvatarGroup -Content {PS >   1..10 | ForEach-Object {PS >     New-UDAvatar -Alt "Remy Sharp" -Content {PS >         "A"PS >     } -Sx @{PS >         borderRadius    = '50%'PS >         backgroundColor = 'error.dark'PS >     }PS >   }PS > } -Sx @{PS >    width = "20%"PS > }Avatar group|Displays a group of avatars.-------------------------- EXAMPLE 5 --------------------------PS >New-UDAvatar -Alt "Remy Sharp" -Content {PS >   "A"PS > } -Sx @{PS >   width = 24PS >   height = 24PS > }PS > New-UDAvatar -Alt "Remy Sharp" -Content {PS >   "A"PS > }PS > New-UDAvatar -Alt "Remy Sharp" -Content {PS >   "A"PS > } -Sx @{PS >   width = 56PS >   height = 56PS > }Sizes|Displays a group of avatars with different sizes.-------------------------- EXAMPLE 6 --------------------------PS >New-UDAvatar -Alt "Remy Sharp" -Content {PS >   New-UDIcon -Icon "User"PS > }Icons|Displays an avatar with an icon.-------------------------- EXAMPLE 7 --------------------------PS >New-UDAvatar -Alt "Remy Sharp" -Image "/broken.png" -Content { "A" }Fallback|Displays an avatar with a fallback to a broken image.-------------------------- EXAMPLE 8 --------------------------PS >New-UDBadge -BadgeContent {PS >     10PS > } -Children {PS >     New-UDAvatarPS > }Badge| Displays an avatar with a badge.


---

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