Cmdlet
New-ConsoleRegion
Creates a named region whose content can be replaced while a dashboard runs.
Syntax
New-ConsoleRegion [[-Content] <ScriptBlock>] [-Fill] [-Height <Int32>] [-Name] <String> [-Weight <Double>] [-Widget <IWidget>] [<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Creates a named region whose content can be replaced while a dashboard runs.
Put the region anywhere in a layout (inside New-ConsolePanel keeps the frame), then call Set-ConsoleRegion -Name with a new widget from the dashboard script. The swap is queued like every update, lands between frames and redraws only what changed.
Examples
EXAMPLE 1
New-ConsoleRegion -Name 'Name'Parameters
- -Content ScriptBlock
- A script block whose widgets are the first content.
- -Fill SwitchParameter
- Takes the remaining height.
- -Height Int32
- A fixed height in rows.
- -Name String
- The region name used by Set-ConsoleRegion.
- -Weight Double
- The share of the remaining space in a row or column layout.
- -Widget IWidget
- A widget as the first content.
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.