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