Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

Get-OfficeMarkdown

Namespace PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Markdown.MarkdownDoc

Parses Markdown text or files into a Markdown document model.

Remarks

Returns an MarkdownDoc for inspection or further rendering.

Examples

Authored help example

Parse a Markdown file.

PS>


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

Loads the file into a Markdown document object.

Parse Markdown text in-memory.

PS>


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

Parses Markdown text directly into a document model.

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.

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

Parameters

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

Outputs

OfficeIMO.Markdown.MarkdownDoc

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

Parameters

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

Outputs

OfficeIMO.Markdown.MarkdownDoc