> 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

New-UDAvatar erstellt eine Avatar-Komponente in PowerShell Universal, die ein Benutzerbild oder ein Symbol innerhalb eines Dashboards anzeigt.

### Ü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 Alternativtext, 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?                    false
Position?                    6
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Children

Der Inhalt, der innerhalb des Avatars angezeigt werden soll.

```
Required?                    false
Position?                    7
Default value                { "A" }
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: Einfacher Avatar

```powershell
New-UDAvatar -Alt "Remy Sharp" -Image "/assets/logo.png"
```

Zeigt einen einfachen Avatar mit einem Bild an.

#### Beispiel 2: Quadratischer Avatar

```powershell
New-UDAvatar -Alt "Remy Sharp" -Content { "B" } -Variant square
```

Zeigt einen quadratischen Avatar mit einem Bild an.

#### Beispiel 3: Avatar mit Text

```powershell
New-UDAvatar -Alt "Remy Sharp" -Content {
  "A"
} -Sx @{
  borderRadius = '50%'
}
```

Zeigt einen Avatar mit Text und benutzerdefinierten CSS-Stilen an.

#### Beispiel 4: Avatar-Gruppe

```powershell
New-UDAvatarGroup -Content {
  1..10 | ForEach-Object {
    New-UDAvatar -Alt "Remy Sharp" -Content {
        "A"
    } -Sx @{
        borderRadius    = '50%'
        backgroundColor = 'error.dark'
    }
  }
} -Sx @{
   width = "20%"
}
```

Zeigt eine Gruppe von Avataren an.

#### Beispiel 5: Größen

```powershell
New-UDAvatar -Alt "Remy Sharp" -Content {
  "A"
} -Sx @{
  width = 24
  height = 24
}
New-UDAvatar -Alt "Remy Sharp" -Content {
  "A"
}
New-UDAvatar -Alt "Remy Sharp" -Content {
  "A"
} -Sx @{
  width = 56
  height = 56
}
```

Zeigt eine Gruppe von Avataren in verschiedenen Größen an.

#### Beispiel 6: Symbole

```powershell
New-UDAvatar -Alt "Remy Sharp" -Content {
  New-UDIcon -Icon "User"
}
```

Zeigt einen Avatar mit einem Symbol an.

#### Beispiel 7: Fallback

```powershell
New-UDAvatar -Alt "Remy Sharp" -Image "/broken.png" -Content { "A" }
```

Zeigt einen Avatar mit einem Fallback auf ein defektes Bild an.

#### Beispiel 8: Badge

```powershell
New-UDBadge -BadgeContent {
    10
} -Children {
    New-UDAvatar
}
```

Zeigt einen Avatar mit einem Badge an.


---

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