Skip to content
ConsoleMonster

Hosts, CI and transcripts

What ConsoleMonster writes on a real console, in CI, in background jobs, remoting and SSH, the ISE, transcripts and redirected output, and with NO_COLOR.

ConsoleMonster draws directly only on a real local interactive console. Everywhere else the cmdlets write through the PowerShell host, line by line as Write-Host does, so jobs complete, transcripts record and redirection captures whole lines.

Where the script runsWhat ConsoleMonster writes
A real local consoleDrawn directly, with colour and live dashboards.
A real console with Start-Transcript runningColoured text through the host UI; the transcript receives the same lines as plain text.
The ISEColoured text through the host UI. Prompts ask through the host.
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 modeNo colour on any route.

Colours on the host routes map to the 16 console colours by role: pass green, fail red, warn yellow, muted dark grey and accent cyan; the light theme uses the darker variants. A live dashboard in those hosts narrates as append-only lines.

Background jobs

job.ps1 Windows PowerShell 5.1
 From a background job
╭───────┬────────╮
│ Check │ Status │
├───────┼────────┤
│ SPF   │ ✓ Pass │
│ DMARC │ ✗ Fail │
╰───────┴────────╯
job.ps1 PowerShell 7.6
 From a background job
╭───────┬────────╮
│ Check │ Status │
├───────┼────────┤
│ SPF   │ ✓ Pass │
│ DMARC │ ✗ Fail │
╰───────┴────────╯
The same job received in Windows PowerShell 5.1 and PowerShell 7, captured by the site tool in a pseudo console.

CI

When a CI system is detected (CI, GitHub Actions, Azure Pipelines, Jenkins, GitLab or TeamCity) or output is redirected, live sessions switch to stream mode: one line per meaningful change, a heartbeat summary every ten seconds and [mm:ss] prefixes in CI, where log viewers often lack their own timestamps.

format-consoletable.ps1 PowerShell 7.6
 PSPublishModule artifacts
+-----------------------------+---------+----------+--------+--------------------------------------+
| Name                        |    Size | Built in | Signed | Path                                 |
+-----------------------------+---------+----------+--------+--------------------------------------+
| NuGet  2                                                                                         |
| ConsoleMonster.2.0.0.nupkg  | 1.41 MB |     48 s | yes    | C:\Support\GitHub...ster.2.0.0.nupkg |
| ConsoleMonster.2.0.0.snupkg |  393 KB |    3.1 s | yes    | C:\Support\GitHub...ter.2.0.0.snupkg |
| Subtotal                    |  1.8 MB |     51 s |        |                                      |
| Module  2                                                                                        |
| ConsoleMonster-2.0.0.zip    | 2.77 MB |     12 s | yes    | C:\Support\GitHub...onster-2.0.0.zip |
| Docs.zip                    | 50.1 KB |    1.2 s | no     | C:\Support\GitHub...\Packed\Docs.zip |
| Subtotal                    | 2.82 MB |     13 s |        |                                      |
+-----------------------------+---------+----------+--------+--------------------------------------+
| Total                       | 4.62 MB | 1 m 04 s |        |                                      |
+-----------------------------+---------+----------+--------+--------------------------------------+
Format-ConsoleTable with CONSOLEMONSTER_MODE=plain: ASCII and no escape sequences, for logs that keep every byte.

Text that reaches stream and plain output is sanitised: escape sequences and control characters in log messages, captured lines or data are removed, so plain mode never emits an escape sequence.

Prompts when nobody can answer

SituationWhat prompts do
CI, redirected input, pwsh -NonInteractive, CONSOLEMONSTER_NONINTERACTIVE=1Return the default, or fail with a message that names the parameter to pass.
Remoting, the ISEAsk through the host: numbered choices and PromptForChoice.
CONSOLEMONSTER_ACCESSIBLE=1Plain numbered questions with no redraws; every answer is confirmed as text.

Known limits

  • Windows Terminal does not expose its colour scheme, so its light schemes need CONSOLEMONSTER_THEME=light.
  • Output that was already printed cannot re-flow on a later resize. Use -Width or a fixed profile when output must fit a known width.
  • Transcript detection, and transcript writing on 5.1, use guarded reflection into PowerShell internals; it does nothing if a future version renames those members.

Edit this page on GitHub