> 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/show-udtoast.md).

# Show-UDToast

Show-UDToast displays a toast notification with a customizable title, icon, color, transition, and screen position in PowerShell Universal.

### Synopsis

Displays a toast message to the user.

### Syntax

```powershell
Show-UDToast [-Message] <String> [-MessageColor <DashboardColor>] [-MessageSize <String>] [-Duration <Int32>] [-Title <String>] [-TitleColor <DashboardColor>] [-TitleSize <String>] [-Id <String>] [-BackgroundColor <DashboardColor>] [-Theme <String>] [-Icon <Object>] [-IconColor <DashboardColor>] [-Position <String>] [-HideCloseButton] [-CloseOnClick] [-CloseOnEscape] [-ReplaceToast] [-RightToLeft] [-Balloon] [-Overlay] [-OverlayClose] [-OverlayColor <DashboardColor>] [-TransitionIn <String>] [-TransitionOut <String>] [-Broadcast] [-Persistent] [<CommonParameters>]
```

### Description

Displays a toast message to the user.

### Parameters

#### -Message

The message to display.

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

#### -MessageColor

The text color of the message.

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

#### -MessageSize

The size of the message.

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

#### -Duration

The duration in milleseconds before the message disappears.

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

#### -Title

The title to display.

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

#### -TitleColor

The text color of the title.

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

#### -TitleSize

The size of the title.

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

#### -Id

The ID of the toast. For use with Hide-UDToast.

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

#### -BackgroundColor

The background color of the toast.

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

#### -Theme

Light or dark theme.

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

#### -Icon

The icon to display in the toast.

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

#### -IconColor

The color of the icon.

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

#### -Position

Where to display the toast.

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

#### -HideCloseButton

Hides the close button.

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

#### -CloseOnClick

Closes the toast when clicked.

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

#### -CloseOnEscape

Closes the toast when esc is pressed.

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

#### -ReplaceToast

Replaces an existing toast if one is already showing.

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

#### -RightToLeft

Right to left text.

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

#### -Balloon

Creates a balloon toast.

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

#### -Overlay

Displays an overlay behind the toast.

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

#### -OverlayClose

Allow the user to close the overlay.

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

#### -OverlayColor

The color of the overlay.

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

#### -TransitionIn

The transition in effect.

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

#### -TransitionOut

The transition out effect.

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

#### -Broadcast

Broadcasts the toast to all connected users.

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

#### -Persistent

Prevents the toast from closing due to the duration.

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

#### Common parameters

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

### Examples

#### Example 1

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!'
} -Id 'toast1'
```

Basic Toast Shows a toast message.

#### Example 2: Duration

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -Duration 5000
} -Id 'toast2'
```

Shows a toast message with a longer duration.

#### Example 3: Title

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -Title 'Toast Title'
} -Id 'toast3'
```

Shows a toast message with a title.

#### Example 4: Title Color

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -Title 'Toast Title' -TitleColor 'red'
} -Id 'toast4'
```

Shows a toast message with a title and a red title color.

#### Example 5: Title Size

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -Title 'Toast Title' -TitleColor 'red' -TitleSize 'large'
} -Id 'toast5'
```

Shows a toast message with a title, a red title color, and a large title size.

#### Example 6: Message Color

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -MessageColor 'blue'
} -Id 'toast6'
```

Shows a toast message with a blue message color.

#### Example 7: Message Size

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -MessageSize 'large'
} -Id 'toast7'
```

Shows a toast message with a large message size.

#### Example 8: Icon

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -Icon 'check'
} -Id 'toast8'
```

Shows a toast message with a check icon.

#### Example 9: Persistent

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -Persistent -Id 'MyToast'
} -Id 'toast9'
New-UDButton -Text 'Hide Toast' -OnClick {
   Hide-UDToast -Id 'MyToast'
} -Id 'toast10'
```

Shows a toast message that will not close. The Hide-UDToast command can be used to close the toast.

#### Example 10: Position

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -Position 'bottomRight'
} -Id 'toast11'
```

Shows a toast message at the bottom right of the screen.

#### Example 11: Hide Close Button

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -HideCloseButton
} -Id 'toast12'
```

Shows a toast message without a close button.

#### Example 12: Close On Click

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -CloseOnClick
} -Id 'toast13'
```

Shows a toast message that will close when clicked.

#### Example 13: Close On Escape

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -CloseOnEscape
} -Id 'toast14'
```

Shows a toast message that will close when the escape key is pressed.

#### Example 14: Replace Toast

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -ReplaceToast -Id "toastId"
} -Id 'toast15'
```

Shows a toast message that will replace an existing toast. -Id is required.

#### Example 15: Right To Left

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -RightToLeft
} -Id 'toast16'
```

Shows a toast message with right to left text.

#### Example 16: Balloon

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -Balloon
} -Id 'toast17'
```

Shows a toast message as a balloon.

#### Example 17: Overlay

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -Overlay
} -Id 'toast18'
```

Shows a toast message as an overlay.

#### Example 18: Theme

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -Theme 'dark'
} -Id 'toast19'
```

Shows a toast message with a dark theme.

#### Example 19: Background Color

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -BackgroundColor 'red'
} -Id 'toast20'
```

Shows a toast message with a red background color.

#### Example 20: Transition

```powershell
New-UDButton -Text 'Show Toast' -OnClick {
   Show-UDToast -Message 'Hello, World!' -TransitionIn 'bounceInLeft' -TransitionOut 'bounceInRight'
} -Id 'toast21'
```

Shows a toast message with a bounce in left transition and a bounce out right transition.


---

# 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/show-udtoast.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.
