> 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/powershell-commands/new-udavatar.md).

# New-UDAvatar

### Synopsis

Creates a new Avatar.

### Syntax

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

### Description

Creates a new Avatar. An avatar is typically an image of a user.

### Parameters

#### -Id

The ID of the component. It defaults to a random GUID.

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

#### -Image

The URL of an image to show in the avatar.

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

#### -Alt

The alt text to assign to the avatar.

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

#### -ClassName

Classes to assign to the avatar component.

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

#### -Variant

The variant type of the avatar. Valid values are: "square", "rounded"

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

#### -Sx The sx property allows you to define custom CSS styles that will be applied to the component.Required?                    falsePosition?                    6Default valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-ChildrenThe content to display within the avatar.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).Outputs--------------------------> EXAMPLE 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/powershell-commands/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.
