Skip to content
ConsoleMonster

Help, errors and progress

Show-ConsoleHelp renders PowerShell's own help; Enable-ConsoleFormatting adds an error view and a progress area, each opt-in.

These features change how PowerShell's own output looks for the session, never what commands return. Each is opt-in and undone by Disable-ConsoleFormatting.

Enable-ConsoleFormatting                     # default output for files, processes, services, dictionaries...
Enable-ConsoleFormatting -Feature ErrorView  # errors that reach the console
Enable-ConsoleFormatting -Feature Progress   # Write-Progress drawn by ConsoleMonster
Enable-ConsoleFormatting -Feature All
Enable-ConsoleFormatting -ProfileSnippet     # prints the lines to keep it on in every session

Help that reads like a page

Show-ConsoleHelp renders the help PowerShell already has, here a function's comment-based help: syntax, a parameter table and highlighted examples.

Show-ConsoleHelp 100×3524-bitFull
PowerShellWebsite/examples/demos/help.ps1
# Show-ConsoleHelp reads the help PowerShell already has: here a function's comment-based help.
function Test-MailDomain {
# … 30 more lines in the full program
Show-ConsoleHelp Test-MailDomain
Full program
# Show-ConsoleHelp reads the help PowerShell already has: here a function's comment-based help.
function Test-MailDomain {
    <#
    .SYNOPSIS
    Checks the mail records of a domain: MX, SPF, DMARC, DKIM and MTA-STS.

    .DESCRIPTION
    Resolves each record, compares it with the recommended settings and returns one result per check.

    .PARAMETER Domain
    The domain to check, for example evotec.xyz.

    .PARAMETER Selector
    The DKIM selectors to look up.

    .PARAMETER Timeout
    How long to wait for each DNS answer.

    .EXAMPLE
    Test-MailDomain -Domain evotec.xyz

    .EXAMPLE
    'evotec.xyz', 'evotec.pl' | Test-MailDomain -Selector selector1, selector2 | Format-ConsoleTable
    #>
    [CmdletBinding()]
    param(
        [Parameter(Mandatory, ValueFromPipeline)][string] $Domain,
        [string[]] $Selector = @('selector1'),
        [timespan] $Timeout = (New-TimeSpan -Seconds 5)
    )
    process { [pscustomobject] @{ Domain = $Domain; Checks = 5 } }
}
Write-Host 'PS> Show-ConsoleHelp Test-MailDomain' -ForegroundColor Yellow
Start-Sleep -Milliseconds 900
Show-ConsoleHelp Test-MailDomain

Use it in your session

PowerShell 5.1 and 7
Install-Module ConsoleMonster -Scope CurrentUser

Reference: Show-ConsoleHelp

Show-ConsoleHelp reads the help PowerShell has for a command (Get-Help -Full): cmdlet help files, comment-based help of functions and scripts, or the syntax PowerShell generates when there is none. It shows the synopsis, the syntax of each parameter set with optional parts told apart, the description, a parameter table, highlighted examples, inputs, outputs and links. Piped to more, Out-Host -Paging or a file, it writes plain lines.

Errors you can read

The error view: the exception, the message, the category and the lines of the script around the failing statement.

Format-ConsoleError 100×624-bitFull
PowerShellWebsite/examples/demos/errors.ps1
# Format-ConsoleError draws an error the way Enable-ConsoleFormatting -Feature ErrorView shows every error that reaches the console.
Get-Item C:\Reports\Weekly-2026-43.pdf -ErrorAction SilentlyContinue -ErrorVariable problem
$problem | Format-ConsoleError -NoStack

Use it in your session

PowerShell 5.1 and 7
Enable-ConsoleFormatting -Feature ErrorView

Reference: Format-ConsoleError

With -Feature ErrorView, errors that reach the console use the same view as Format-ConsoleError: the exception type, the message, the category, the lines of the script around the failing statement, and the call stack with framework frames folded. It follows $ErrorView: DetailedView adds the stack, and CategoryView keeps PowerShell's own view.

Write-Progress, drawn below the cursor

An unchanged Write-Progress loop with a nested activity. Output written in between scrolls above the progress area.

Write-Progress, drawn by ConsoleMonster 96×424-bitFull
PowerShellWebsite/examples/demos/progress.ps1
# An ordinary Write-Progress loop, drawn by ConsoleMonster once the Progress feature is on.
Enable-ConsoleFormatting -Feature Progress
$sites = 'Warsaw', 'Dublin', 'Berlin'
for ($i = 0; $i -lt $sites.Count; $i++) {
    Write-Progress -Id 1 -Activity 'Collecting inventory' -Status $sites[$i] -PercentComplete ($i * 100 / $sites.Count)
    foreach ($server in 1..12) {
        Write-Progress -Id 2 -ParentId 1 -Activity "Servers in $($sites[$i])" -Status "SRV$server" -PercentComplete ($server * 100 / 12)
        Start-Sleep -Milliseconds 110
    }
    Write-Host "$($sites[$i]) done: 12 servers"
}
Write-Progress -Id 2 -Activity 'Servers' -Completed
Write-Progress -Id 1 -Activity 'Collecting inventory' -Completed
Disable-ConsoleFormatting

Use it in your session

PowerShell 5.1 and 7
Enable-ConsoleFormatting -Feature Progress

Reference: Write-ConsoleProgress

With -Feature Progress, Write-Progress becomes an alias of Write-ConsoleProgress for the session, so existing loops get ConsoleMonster's progress area: one row per activity below the cursor, nested with -ParentId, with a bar, the percentage, the status and the elapsed time. Output written in between appears above the area, and the area disappears when every activity completes. $ProgressPreference is honoured. Progress written by compiled cmdlets such as Copy-Item is still drawn by PowerShell.

Edit this page on GitHub