Show-ConsoleMarkdown
Reads Markdown with native console tables, highlighted code and interactive paging.
Syntax
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.mdRead a local document, paging only when it exceeds the interactive screen
Example 2
Show-ConsoleMarkdown -Content '# Deployment notes' -NoPagerRender inline content without a pager
Example 3
Get-Content .\deployment.md | Show-ConsoleMarkdown -Width 60 -AsStringJoin pipeline source lines and return the complete plain rendering
Parameters
- -AsString SwitchParameter
- Returns the complete view as one plain string and never opens the pager.
- -Content String
- The Markdown source. Pipeline strings are joined with newlines before parsing.
- -NoPager SwitchParameter
- Prints the entire document without acquiring interactive input.
- -Width Int32
- The layout width in terminal cells. Omit it to use the current terminal width.
- -Path String
- 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.