Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Get-OfficeMarkdown

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Markdown.MarkdownDoc

Parses Markdown text or files into a Markdown document model.

Syntax

Get-OfficeMarkdown
[-AllowDataUrls <Boolean>]
[-AllowedUrlScheme <String[]>]
[-AllowMailtoUrls <Boolean>]
[-AllowProtocolRelativeUrls <Boolean>]
[-BaseUri <String>]
[-DisallowFileUrls <Boolean>]
[-MaxInputCharacters <Int32>]
[-NormalizeInput <IntelligenceXTranscript|IntelligenceXTranscriptStrict|DocsLoose>]
[-Options <MarkdownReaderOptions>]
[-Path] <String>
[-Profile <OfficeIMO|CommonMark|GitHubFlavoredMarkdown|Portable>]
[-RestrictUrlSchemes <Boolean>]
[<CommonParameters>]
#
Parameter set: Path
Get-OfficeMarkdown
[-AllowDataUrls <Boolean>]
[-AllowedUrlScheme <String[]>]
[-AllowMailtoUrls <Boolean>]
[-AllowProtocolRelativeUrls <Boolean>]
[-BaseUri <String>]
[-DisallowFileUrls <Boolean>]
[-MaxInputCharacters <Int32>]
[-NormalizeInput <IntelligenceXTranscript|IntelligenceXTranscriptStrict|DocsLoose>]
[-Options <MarkdownReaderOptions>]
[-Profile <OfficeIMO|CommonMark|GitHubFlavoredMarkdown|Portable>]
[-RestrictUrlSchemes <Boolean>]
-Text <String>
[<CommonParameters>]
#
Parameter set: Text

Description

Returns an MarkdownDoc for inspection or further rendering.

Examples

Parse a Markdown file.

$md = Get-OfficeMarkdown -Path .\README.md

Loads the file into a Markdown document object.

Parse Markdown text in-memory.

$md = Get-OfficeMarkdown -Text '# Title`n`nBody text'

Parses Markdown text directly into a document model.

Parameters

-AllowDataUrls Boolean optional
Allow data URLs while parsing Markdown links and images.
-AllowedUrlScheme String[] optional
Allowed URL schemes when URL scheme restriction is enabled.
-AllowMailtoUrls Boolean optional
Allow mailto URLs while parsing Markdown links.
-AllowProtocolRelativeUrls Boolean optional
Allow protocol-relative URLs while parsing Markdown links and images.
-BaseUri String optional
Base URI used to resolve and restrict relative Markdown links and images.
-DisallowFileUrls Boolean optional
Block file URLs while parsing Markdown links and images.
-MaxInputCharacters Int32 optional
Maximum Markdown input length accepted by the reader.
-NormalizeInput MarkdownInputNormalizationPreset optional
Applies a built-in Markdown input normalization preset before parsing.
Possible values: IntelligenceXTranscript, IntelligenceXTranscriptStrict, DocsLoose
-Options MarkdownReaderOptions optionalaliases: ReaderOptions
Optional reader options.
-Path String requiredposition: 0aliases: FilePath, InputPathsets: Path
Path to the Markdown file.
-Profile MarkdownDialectProfile optional
Named reader profile used when Options is not supplied.
Possible values: OfficeIMO, CommonMark, GitHubFlavoredMarkdown, Portable
-RestrictUrlSchemes Boolean optional
Restrict parsed URL schemes to the allow-list.
-Text String requiredsets: Text
Markdown text to parse.

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.