New-ConsoleAlign
Aligns console widgets left, centre or right, and top, middle or bottom, inside their space.
Syntax
New-ConsoleAlign [[-Content] <ScriptBlock>] [-Fill] [-Height <Int32>] [-Horizontal <Left|Center|Right>] [-Vertical <Top|Middle|Bottom>] [-Weight <Double>] [-Widget <IWidget>] [<CommonParameters>]#All Parameter SetsDescription
Aligns console widgets left, centre or right, and top, middle or bottom, inside their space.
The content keeps its measured size and is placed within the space the parent gives it. Horizontal alignment uses the full width; vertical alignment applies when the parent gives more rows than the content needs (-Height or -Fill). Widgets that already use the full width, such as progress bars, only move vertically.
Examples
EXAMPLE 1
New-ConsoleAlign -Content { }Parameters
- -Content ScriptBlock
- Scriptblock that emits the content (several widgets are stacked vertically).
- -Fill SwitchParameter
- Take the remaining height of a live dashboard.
- -Height Int32
- Fixed height in rows.
- -Horizontal HorizontalAlignment
- Horizontal placement: Left, Center (default) or Right.
- Possible values:
Left,Center,Right - -Vertical VerticalAlignment
- Vertical placement: Top (default), Middle or Bottom.
- Possible values:
Top,Middle,Bottom - -Weight Double
- Share of the width (in columns) or height (in a live dashboard) this widget takes.
- -Widget IWidget
- A widget to align instead of a scriptblock.
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.