For the complete documentation index, see llms.txt. This page is also available as Markdown.

New-UDAlert

Synopsis

An alert displays a short, important message in a way that attracts the user's attention without interrupting the user's task.

Syntax

New-UDAlert [-Id <String>] [-Severity <String>] [-Text <String>] [-Title <String>] [-ClassName <String>] [-Style <Hashtable>] [-Dense] [<CommonParameters>]

New-UDAlert [-Id <String>] [-Severity <String>] [-Children <ScriptBlock>] [-Title <String>] [-ClassName <String>] [-Style <Hashtable>] [-Dense] [<CommonParameters>]

Description

An alert displays a short, important message in a way that attracts the user's attention without interrupting the user's task.

Parameters

-Id

The ID of this component.

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

-Severity

The severity of this alert. Valid values are: "success", "error", "warning", "info"

-Children

Content of the alert.

-Text

Text for the body of the alert.

-Title

A title for this alert.

-ClassName

A CSS class to apply to the alert.

-Style

An hashtable of styles to apply to this component.

-Dense

Reduces the vertical padding of the alert.

Common parameters

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.

Outputs

Examples

Example 1: Basic alert

The alert offers four severity levels that set a distinctive icon and color.

Example 2: Text and Title

You can use the -Title parameter to display a formatted title above the content.

Example 3: Dense

You can use the -Dense parameter to reduce the vertical padding of the alert.

Last updated

Was this helpful?