Skip to content
ConsoleMonster
Cmdlet

Set-ConsoleRegion

Module ConsoleMonster
Inputs
ConsoleMonster.Layout.IWidget

Replaces the content of a region (New-ConsoleRegion) in the running dashboard.

Syntax

Set-ConsoleRegion [[-Content] <ScriptBlock>] [-Name] <String> [-Session <LiveSession>] [-Widget <IWidget>] [<CommonParameters>]
#
Parameter set: Content
Set-ConsoleRegion -Clear [-Name] <String> [-Session <LiveSession>] [<CommonParameters>]
#
Parameter set: Clear

Description

Replaces the content of a region (New-ConsoleRegion) in the running dashboard.

The new widget is shown from the next frame on; the surrounding frame stays, and live widgets inside the new content (lanes, logs, live tables) can be updated by name right away. Use it from the dashboard script, like the Update-Console* commands.

Examples

Authored help example

EXAMPLE 1

Set-ConsoleRegion -Name 'Name'

EXAMPLE 2

Set-ConsoleRegion -Name 'Name' -Clear

Parameters

-Content ScriptBlock optionalposition: 1sets: Content
A script block whose widgets become the content.
-Name String requiredposition: 0
The region name.
-Session LiveSession optional
The live session to update. Defaults to $ConsoleSession or the running dashboard.
-Widget IWidget optionalpipeline: True (ByValue)sets: Content
The widget that becomes the content.
-Clear SwitchParameter requiredsets: Clear
Empties the region.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.