Skip to content
ConsoleMonster

ConsoleMonster in PowerShell

124 cmdlets with a plain Console noun, in one binary module for Windows PowerShell 5.1 and PowerShell 7. Every frame on this page was captured from both hosts running the script beside it.

Show-ConsoleTable PowerShell 7.624-bit

Install

  1. Install the module for your user (Windows PowerShell 5.1 or PowerShell 7):

    Install-Module ConsoleMonster -Scope CurrentUser
    
  2. Import it in the session, or in your profile ($PROFILE) for every session:

    Import-Module ConsoleMonster
    

ConsoleMonster is on the PowerShell Gallery and replaces the old 0.0.x module. To make ordinary output readable for the whole session, add Enable-ConsoleFormatting; the everyday output guide shows it before and after, and PowerShell conventions explains how every widget command reads.

Each script below is complete: save it and run it. For this page each one ran in a Windows pseudo console of a fixed width, on both hosts, with the module built from the same source as this site and the culture pinned to en-US for ConsoleMonster and the built-in cmdlets. Live dashboards started with Invoke-ConsoleDashboard are on the live dashboards page, and prompts, menus and forms on the interactive page.

Show-ConsoleTable beside Format-Table

The same four objects, formatted by the built-in cmdlet and by ConsoleMonster in a 100-column console. Show-ConsoleTable takes pipeline input and -Property as Format-Table does: names, wildcards and calculated properties, plus hashtables with column options.

Format-Table

Format-Table -AutoSize PowerShell 7.6

Show-ConsoleTable

Show-ConsoleTable PowerShell 7.6
PowerShellformat-table.ps1
# Build artifacts as a module build reports them.
$artifacts = @(
    [pscustomobject] @{ Name = 'Orion.2.0.0.nupkg'; Kind = 'NuGet'; Length = 1482113
        Time = [timespan]::FromSeconds(48.2); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.nupkg' }
    [pscustomobject] @{ Name = 'Orion.2.0.0.snupkg'; Kind = 'NuGet'; Length = 402331
        Time = [timespan]::FromSeconds(3.1); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.snupkg' }
    # … 6 more lines in the full program
)

$artifacts | Format-Table -AutoSize
Full program
# Build artifacts as a module build reports them.
$artifacts = @(
    [pscustomobject] @{ Name = 'Orion.2.0.0.nupkg'; Kind = 'NuGet'; Length = 1482113
        Time = [timespan]::FromSeconds(48.2); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.nupkg' }
    [pscustomobject] @{ Name = 'Orion.2.0.0.snupkg'; Kind = 'NuGet'; Length = 402331
        Time = [timespan]::FromSeconds(3.1); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.snupkg' }
    [pscustomobject] @{ Name = 'Orion-2.0.0.zip'; Kind = 'Module'; Length = 2904576
        Time = [timespan]::FromSeconds(11.7); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion-2.0.0.zip' }
    [pscustomobject] @{ Name = 'Docs.zip'; Kind = 'Module'; Length = 51302
        Time = [timespan]::FromSeconds(1.2); Signed = $false
        Path = 'D:\Builds\Orion\Packed\Docs.zip' }
)

$artifacts | Format-Table -AutoSize
PowerShellformat-consoletable.ps1
# Build artifacts as a module build reports them.
$artifacts = @(
    [pscustomobject] @{ Name = 'Orion.2.0.0.nupkg'; Kind = 'NuGet'; Length = 1482113
        Time = [timespan]::FromSeconds(48.2); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.nupkg' }
    [pscustomobject] @{ Name = 'Orion.2.0.0.snupkg'; Kind = 'NuGet'; Length = 402331
        Time = [timespan]::FromSeconds(3.1); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.snupkg' }
    # … 6 more lines in the full program
)

$artifacts | Show-ConsoleTable -Title '[bold]Build artifacts[/]' -GroupBy Kind -Property @(
    @{ Name = 'Name'; Key = $true; Overflow = 'Never' }
    @{ Name = 'Length'; Header = 'Size'; Presenter = 'Bytes'; Priority = 9; Aggregate = 'Sum' }
    @{ Name = 'Time'; Header = 'Built in'; Presenter = 'Duration'; Priority = 6; Aggregate = 'Sum' }
    @{ Name = 'Signed'; Presenter = 'Boolean'; Priority = 5 }
    @{ Name = 'Path'; Overflow = 'TruncateMiddle'; Priority = 1; MinWidth = 20 }
) -ShowTotals
Full program
Import-Module ConsoleMonster

# Build artifacts as a module build reports them.
$artifacts = @(
    [pscustomobject] @{ Name = 'Orion.2.0.0.nupkg'; Kind = 'NuGet'; Length = 1482113
        Time = [timespan]::FromSeconds(48.2); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.nupkg' }
    [pscustomobject] @{ Name = 'Orion.2.0.0.snupkg'; Kind = 'NuGet'; Length = 402331
        Time = [timespan]::FromSeconds(3.1); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.snupkg' }
    [pscustomobject] @{ Name = 'Orion-2.0.0.zip'; Kind = 'Module'; Length = 2904576
        Time = [timespan]::FromSeconds(11.7); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion-2.0.0.zip' }
    [pscustomobject] @{ Name = 'Docs.zip'; Kind = 'Module'; Length = 51302
        Time = [timespan]::FromSeconds(1.2); Signed = $false
        Path = 'D:\Builds\Orion\Packed\Docs.zip' }
)

$artifacts | Show-ConsoleTable -Title '[bold]Build artifacts[/]' -GroupBy Kind -Property @(
    @{ Name = 'Name'; Key = $true; Overflow = 'Never' }
    @{ Name = 'Length'; Header = 'Size'; Presenter = 'Bytes'; Priority = 9; Aggregate = 'Sum' }
    @{ Name = 'Time'; Header = 'Built in'; Presenter = 'Duration'; Priority = 6; Aggregate = 'Sum' }
    @{ Name = 'Signed'; Presenter = 'Boolean'; Priority = 5 }
    @{ Name = 'Path'; Overflow = 'TruncateMiddle'; Priority = 1; MinWidth = 20 }
) -ShowTotals
  • -GroupBy, -Total, -Top, -Width and -Culture
  • Presenters for bytes, durations, dates, booleans and status
  • Without -Property, an object's DefaultDisplayPropertySet is used
  • Redirected output is plain text; -PassThru also writes the input objects

Lists and trees

Show-Console -View List shows one object as a record view. Show-Console -View Tree walks nested objects and collections, with depth, item and node limits.

Format-List

Format-List PowerShell 7.6
PowerShellformat-list.ps1
# Build artifacts as a module build reports them.
$artifacts = @(
    [pscustomobject] @{ Name = 'Orion.2.0.0.nupkg'; Kind = 'NuGet'; Length = 1482113
        Time = [timespan]::FromSeconds(48.2); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.nupkg' }
    [pscustomobject] @{ Name = 'Orion.2.0.0.snupkg'; Kind = 'NuGet'; Length = 402331
        Time = [timespan]::FromSeconds(3.1); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.snupkg' }
    # … 6 more lines in the full program
)

$artifacts[0] | Format-List
Full program
# Build artifacts as a module build reports them.
$artifacts = @(
    [pscustomobject] @{ Name = 'Orion.2.0.0.nupkg'; Kind = 'NuGet'; Length = 1482113
        Time = [timespan]::FromSeconds(48.2); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.nupkg' }
    [pscustomobject] @{ Name = 'Orion.2.0.0.snupkg'; Kind = 'NuGet'; Length = 402331
        Time = [timespan]::FromSeconds(3.1); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.snupkg' }
    [pscustomobject] @{ Name = 'Orion-2.0.0.zip'; Kind = 'Module'; Length = 2904576
        Time = [timespan]::FromSeconds(11.7); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion-2.0.0.zip' }
    [pscustomobject] @{ Name = 'Docs.zip'; Kind = 'Module'; Length = 51302
        Time = [timespan]::FromSeconds(1.2); Signed = $false
        Path = 'D:\Builds\Orion\Packed\Docs.zip' }
)

$artifacts[0] | Format-List

Show-Console -View List

Show-Console -View List PowerShell 7.6
PowerShellformat-consolelist.ps1
# Build artifacts as a module build reports them.
$artifacts = @(
    [pscustomobject] @{ Name = 'Orion.2.0.0.nupkg'; Kind = 'NuGet'; Length = 1482113
        Time = [timespan]::FromSeconds(48.2); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.nupkg' }
    [pscustomobject] @{ Name = 'Orion.2.0.0.snupkg'; Kind = 'NuGet'; Length = 402331
        Time = [timespan]::FromSeconds(3.1); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.snupkg' }
    # … 6 more lines in the full program
)

$artifacts[0] |
    Show-Console -View List -Property Name, Kind, @{ Name = 'Length'; Header = 'Size'
        Presenter = 'Bytes' }, @{ Name = 'Time'; Header = 'Built in'
            Presenter = 'Duration' }, @{ Name = 'Signed'; Presenter = 'Boolean' }, Path
Full program
Import-Module ConsoleMonster

# Build artifacts as a module build reports them.
$artifacts = @(
    [pscustomobject] @{ Name = 'Orion.2.0.0.nupkg'; Kind = 'NuGet'; Length = 1482113
        Time = [timespan]::FromSeconds(48.2); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.nupkg' }
    [pscustomobject] @{ Name = 'Orion.2.0.0.snupkg'; Kind = 'NuGet'; Length = 402331
        Time = [timespan]::FromSeconds(3.1); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.snupkg' }
    [pscustomobject] @{ Name = 'Orion-2.0.0.zip'; Kind = 'Module'; Length = 2904576
        Time = [timespan]::FromSeconds(11.7); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion-2.0.0.zip' }
    [pscustomobject] @{ Name = 'Docs.zip'; Kind = 'Module'; Length = 51302
        Time = [timespan]::FromSeconds(1.2); Signed = $false
        Path = 'D:\Builds\Orion\Packed\Docs.zip' }
)

$artifacts[0] |
    Show-Console -View List -Property Name, Kind, @{ Name = 'Length'; Header = 'Size'
        Presenter = 'Bytes' }, @{ Name = 'Time'; Header = 'Built in'
            Presenter = 'Duration' }, @{ Name = 'Signed'; Presenter = 'Boolean' }, Path

Show-ConsoleObject -StaticSnapshot

Show-ConsoleObject PowerShell 7.6
PowerShellformat-consoletree.ps1
$certificate = [pscustomobject] @{
    Subject                 = 'CN=mail.evotec.xyz'
    Issuer                  = "CN=R11, O=Let's Encrypt, C=US"
    KeyAlgorithm            = 'ECDSA P-256'
    SubjectAlternativeNames = @('mail.evotec.xyz', 'autodiscover.evotec.xyz', 'mta-sts.evotec.xyz')
    Chain                   = @(
        [pscustomobject] @{ Subject = 'CN=mail.evotec.xyz'; Key = 'ECDSA P-256'; Revoked = $false }
        [pscustomobject] @{ Subject = "CN=R11, O=Let's Encrypt"; Key = 'RSA 2048'
            Revoked = $false }
        [pscustomobject] @{ Subject = 'CN=ISRG Root X1'; Key = 'RSA 4096'; Revoked = $false }
    )
}
$certificate | Show-Console -View Tree -Title 'mail.evotec.xyz certificate'
Full program
Import-Module ConsoleMonster

$certificate = [pscustomobject] @{
    Subject                 = 'CN=mail.evotec.xyz'
    Issuer                  = "CN=R11, O=Let's Encrypt, C=US"
    KeyAlgorithm            = 'ECDSA P-256'
    SubjectAlternativeNames = @('mail.evotec.xyz', 'autodiscover.evotec.xyz', 'mta-sts.evotec.xyz')
    Chain                   = @(
        [pscustomobject] @{ Subject = 'CN=mail.evotec.xyz'; Key = 'ECDSA P-256'; Revoked = $false }
        [pscustomobject] @{ Subject = "CN=R11, O=Let's Encrypt"; Key = 'RSA 2048'
            Revoked = $false }
        [pscustomobject] @{ Subject = 'CN=ISRG Root X1'; Key = 'RSA 4096'; Revoked = $false }
    )
}
$certificate | Show-Console -View Tree -Title 'mail.evotec.xyz certificate'

The same command on other consoles

Show-ConsoleTable from above, run again in a new session with the terminal profile overridden. The script does not change.

16 colours and ASCII glyphs

CONSOLEMONSTER_COLOR=16, CONSOLEMONSTER_GLYPHS=ascii Windows PowerShell 5.1
PowerShell
$env:CONSOLEMONSTER_COLOR = '16'
$env:CONSOLEMONSTER_GLYPHS = 'ascii'
powershell -NoProfile -File .\format-consoletable.ps1
Remove-Item Env:CONSOLEMONSTER_COLOR, Env:CONSOLEMONSTER_GLYPHS

NO_COLOR

NO_COLOR=1 PowerShell 7.6
PowerShell
$env:NO_COLOR = '1'
pwsh -NoProfile -File ./format-consoletable.ps1
Remove-Item Env:NO_COLOR

Plain mode

CONSOLEMONSTER_MODE=plain PowerShell 7.6
PowerShell
$env:CONSOLEMONSTER_MODE = 'plain'
pwsh -NoProfile -File ./format-consoletable.ps1
Remove-Item Env:CONSOLEMONSTER_MODE

A 56-column console

56 columns PowerShell 7.6
PowerShell
# In a window 56 columns wide:
pwsh -NoProfile -File ./format-consoletable.ps1

Where the output goes

Cmdlets draw directly only on a real local console. Everywhere else they write through the PowerShell host, line by line as Write-Host does, so jobs complete, transcripts record and 6>&1 captures the output.

Where the script runsWhat ConsoleMonster writes
A real local interactive consoleDrawn directly, with colour and live dashboards.
A real console with Start-Transcript running, and the ISEColoured text through the host UI. The transcript receives the same lines as plain text.
Background jobs and remotingWrite-Host style information records (tag PSHOST) with foreground and background colours.
Redirected output, thread jobs and other hostsOne plain record per line, so files, transcripts and 6>&1 get whole lines of plain text.
NO_COLOR, CONSOLEMONSTER_COLOR=none, plain modeHost output stays uncoloured.

Receive-Job in PowerShell 7.6

Start-Job | Receive-Job PowerShell 7.6

Receive-Job in Windows PowerShell 5.1

Start-Job | Receive-Job Windows PowerShell 5.1
PowerShelljob.ps1
$module = (Get-Module ConsoleMonster).Path
Start-Job -ArgumentList $module {
    param($Module)
    Import-Module $Module
    [pscustomobject] @{ Check = 'SPF'
        Status = 'Pass' }, [pscustomobject] @{ Check = 'DMARC'; Status = 'Fail' } |
        Show-ConsoleTable -Title 'From a background job' -StatusProperty Status
} | Receive-Job -Wait -AutoRemoveJob
Full program
Import-Module ConsoleMonster

$module = (Get-Module ConsoleMonster).Path
Start-Job -ArgumentList $module {
    param($Module)
    Import-Module $Module
    [pscustomobject] @{ Check = 'SPF'
        Status = 'Pass' }, [pscustomobject] @{ Check = 'DMARC'; Status = 'Fail' } |
        Show-ConsoleTable -Title 'From a background job' -StatusProperty Status
} | Receive-Job -Wait -AutoRemoveJob

How output behaves in CI, jobs, remoting, SSH, the ISE and transcripts

124 cmdlets

Grouped by verb, with the synopsis from the module's help. Each links to its full reference with syntax, parameters and examples.

Write 3

New 55

Start 1

  • Start-ConsoleRunStarts a bounded run dashboard for work scheduled by your script.

Update 1

  • Update-ConsoleUpdates a live widget or a caller-managed run through one validated operation.

Read 7

Show 16

  • Show-ConsoleShows objects, text and widgets in a readable view that fits the terminal.
  • Show-ConsoleAppRuns native input controls and dependent displays in a console application.
  • Show-ConsoleDemoRuns an embedded ConsoleMonster gallery demo in the current PowerShell runspace.
  • Show-ConsoleDiagramShows a diagram from connection rows, a Diagram widget or a ChartForgeX file, with use case playback.
  • Show-ConsoleGridShows pipeline objects in an interactive grid and returns the rows you choose.
  • Show-ConsoleHelpShows a command's help: synopsis, highlighted syntax, a parameter table and highlighted examples.
  • Show-ConsoleImageShows an image in the console, at the size you ask for in cells.
  • Show-ConsoleMenuShows a menu until the user exits.
  • Show-ConsoleObjectExplores an object's members with the keyboard.
  • Show-ConsoleOverviewShows a compact, read-only summary of the local host.
  • Show-ConsolePresentationPresents a scripted demo one command at a time in a real shell.
  • Show-ConsolePromptPreviews the ConsoleMonster shell prompt without installing it.
  • Show-ConsoleReplayRewinds a recorded run: an in-terminal player with a timeline, markers, failures, warnings and log search.
  • Show-ConsoleSettingChooses ConsoleMonster's settings in the terminal with a live preview.
  • Show-ConsoleStatusLineShows one status line that updates in place, with an optional spinner, clock and elapsed time.
  • Show-ConsoleTableShows objects as a table with fitted columns, readable values and optional grouping.

Export 4

  • Export-ConsoleFrameExports a widget, a rendered frame or a live-session snapshot to PNG, HTML, SVG, Markdown or text.
  • Export-ConsolePromptWrites the prompt configuration or a built-in preset as a prompt theme file to share.
  • Export-ConsoleRecordingExports a terminal session or dashboard recording to slide images, animations, video, a player or asciicast.
  • Export-ConsoleThemeExports the current ConsoleMonster theme as a starting file for a user or team.

Invoke 5

  • Invoke-ConsoleDashboardRuns a console dashboard live while a script does the work.
  • Invoke-ConsoleHeadlessRuns a script (usually an app) on a headless terminal with scripted input and returns the screens it drew.
  • Invoke-ConsolePesterRuns Pester tests with a live ConsoleMonster dashboard and a summary table.
  • Invoke-ConsoleRecordingRecords a script, an app on a headless terminal, or an interactive child shell and saves the result.
  • Invoke-ConsoleRunRuns a script block for every input item, optionally in parallel, with a live view of the run.

Add 2

Assert 1

Compare 2

  • Compare-ConsoleObjectCompares object sets or shows property drift across a baseline matrix.
  • Compare-ConsoleTextCompares text or files with numbered lines, highlighted words and collapsed unchanged regions.

Complete 1

ConvertTo 1

Disable 1

  • Disable-ConsoleFormattingTurns off the ConsoleMonster default formatting (Enable-ConsoleFormatting), all of it or some features.

Enable 1

Get 5

Import 3

Register 1

Reset 1

  • Reset-ConsoleSettingUndoes Set-ConsoleSetting for this session, and with -Save removes the value from the settings file.

Set 4

Stop 1

Test 1

  • Test-ConsoleThemeChecks a theme's text contrast, status colours, markers and critical fill.

Unregister 1

Use 3

  • Use-ConsoleGroupRuns a script inside a collapsible CI log group or beneath a muted terminal heading.
  • Use-ConsoleProgressRuns a script and shows its Write-Progress calls as an inline progress area.
  • Use-ConsoleTargetRuns a script block with ConsoleMonster output going somewhere else: a file, a text writer, any target, or a string.

Wait 1

Watch 2

  • Watch-ConsoleRuns a script block again and again and shows its latest output as a live view.
  • Watch-ConsoleLogFollows a log file or a local Windows event log with a live, scrollable log view.