Cmdlet
New-ConsoleRows
Stacks console widgets vertically.
Syntax
New-ConsoleRows
[[-Content] <Object>]
[-Fill]
[-Gap <Int32>]
[-Weight <Double>]
[<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Children emitted by the scriptblock are placed top to bottom. In a live dashboard, children created with -Fill or -Weight share the remaining height.
Examples
Example 1
$rowsOptions = @{
Gap = 1
Content = { New-ConsoleRule -Title 'Summary'; New-ConsoleKeyValue -InputObject @{ Total = 12 } }
}
New-ConsoleRows @rowsOptionsTwo widgets stacked with a blank row between them
Example 2
$rowsOptions = @{
Gap = 1
Content = {
$textOptions2 = @{
Text = @('Inventory')
Decoration = @('Bold')
}
New-ConsoleText @textOptions2
$textOptions = @{
Text = @('web01 and web02 are online')
Role = 'Pass'
}
New-ConsoleText @textOptions
}
}
New-ConsoleRows @rowsOptions | Show-ConsoleStack an inventory heading and result
Example 3
Get-ConsoleDemo -Slug 'live-filter' | Select-Object -ExpandProperty Source
Get-ConsoleDemo -Slug 'task-menu' | Select-Object -ExpandProperty SourceRead any of these gallery scripts to see New-ConsoleRows in a complete example. Each lookup returns the script's source. Use the same slug with Show-ConsoleDemo to run it.
Parameters
- -Content Object
- Scriptblock that emits the child widgets.
- -Fill SwitchParameter
- Take the remaining height of a live dashboard.
- -Gap Int32
- Blank rows between children.
- -Weight Double
- Share of the space this group takes inside its parent.
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.