Skip to content
ConsoleMonster
Cmdlet

Show-ConsoleMarkdown

Module
ConsoleMonster
Inputs
System.String
Outputs
System.String

Reads Markdown with native console tables, highlighted code and interactive paging.

Syntax

Show-ConsoleMarkdown
[-AsString]
[-Content] <String>
[-NoPager]
[-Width <Int32>]
[<CommonParameters>]
#
Parameter set: Content
Show-ConsoleMarkdown
[-AsString]
[-NoPager]
-Path <String>
[-Width <Int32>]
[<CommonParameters>]
#
Parameter set: Path

Description

Reads CommonMark with pipe tables through the optional OfficeIMO-backed add-on. Headings use accent rules, lists have hanging indents, and block quotes have a vertical bar. Code uses the registered highlighter and its language label. Links use OSC 8 when supported and show a muted URL otherwise. HTML stays literal, images become labelled links, and document content is never executed or fetched. Long documents page only when output goes directly to an interactive host. Piped, redirected, recorded and non-interactive output never acquires input. Pipeline strings are joined before parsing, preserving reference links and block structure. Works on Windows PowerShell 5.1 and PowerShell 7.

Examples

Example 1

Show-ConsoleMarkdown -Path .\README.md

Read a local document, paging only when it exceeds the interactive screen

Example 2

Show-ConsoleMarkdown -Content '# Deployment notes' -NoPager

Render inline content without a pager

Example 3

Get-Content .\deployment.md | Show-ConsoleMarkdown -Width 60 -AsString

Join pipeline source lines and return the complete plain rendering

Parameters

-AsString SwitchParameter optional
Returns the complete view as one plain string and never opens the pager.
-Content String requiredposition: 0pipeline: True (ByValue)aliases: InputObject, Textsets: Content
The Markdown source. Pipeline strings are joined with newlines before parsing.
-NoPager SwitchParameter optional
Prints the entire document without acquiring interactive input.
-Width Int32 optional
The layout width in terminal cells. Omit it to use the current terminal width.
-Path String requiredaliases: FullName, LiteralPathsets: Path
A literal file path, resolved relative to the current PowerShell FileSystem location.

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.