# Get-OfficeMarkdownHeading

Gets heading metadata from a Markdown document. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

Project

PSWriteOffice

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

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Markdown.MarkdownDoc`

**Outputs**

`OfficeIMO.Markdown.MarkdownDoc+HeadingInfo`

**Source**

[GetOfficeMarkdownHeadingCommand.cs:23](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Markdown/GetOfficeMarkdownHeadingCommand.cs#L23) 

Gets heading metadata from a Markdown document.

## Syntax

```
Get-OfficeMarkdownHeading
[-AllowDataUrls <Boolean>]
[-AllowedUrlScheme <String[]>]
[-AllowMailtoUrls <Boolean>]
[-AllowProtocolRelativeUrls <Boolean>]
[-Anchor <String>]
[-BaseUri <String>]
[-CaseSensitive]
[-DisallowFileUrls <Boolean>]
[-HeadingText <String>]
[-MaxInputCharacters <Int32>]
[-MaxLevel <Int32>]
[-MinLevel <Int32>]
[-NormalizeInput <IntelligenceXTranscript|IntelligenceXTranscriptStrict|DocsLoose>]
[-Options <MarkdownReaderOptions>]
[-Path] <String>
[-Profile <OfficeIMO|CommonMark|GitHubFlavoredMarkdown|Portable>]
[-RestrictUrlSchemes <Boolean>]
[<CommonParameters>]
```

[#](#member-ba777f2346f0fbfe1e2f14ca)

Parameter set: `Path`

```
Get-OfficeMarkdownHeading
[-AllowDataUrls <Boolean>]
[-AllowedUrlScheme <String[]>]
[-AllowMailtoUrls <Boolean>]
[-AllowProtocolRelativeUrls <Boolean>]
[-Anchor <String>]
[-BaseUri <String>]
[-CaseSensitive]
[-DisallowFileUrls <Boolean>]
-Document <MarkdownDoc>
[-HeadingText <String>]
[-MaxInputCharacters <Int32>]
[-MaxLevel <Int32>]
[-MinLevel <Int32>]
[-NormalizeInput <IntelligenceXTranscript|IntelligenceXTranscriptStrict|DocsLoose>]
[-Options <MarkdownReaderOptions>]
[-Profile <OfficeIMO|CommonMark|GitHubFlavoredMarkdown|Portable>]
[-RestrictUrlSchemes <Boolean>]
[<CommonParameters>]
```

[#](#member-33fcbbaaac4acac8f322c3a6)

Parameter set: `Document`

```
Get-OfficeMarkdownHeading
[-AllowDataUrls <Boolean>]
[-AllowedUrlScheme <String[]>]
[-AllowMailtoUrls <Boolean>]
[-AllowProtocolRelativeUrls <Boolean>]
[-Anchor <String>]
[-BaseUri <String>]
[-CaseSensitive]
[-DisallowFileUrls <Boolean>]
[-HeadingText <String>]
[-MaxInputCharacters <Int32>]
[-MaxLevel <Int32>]
[-MinLevel <Int32>]
[-NormalizeInput <IntelligenceXTranscript|IntelligenceXTranscriptStrict|DocsLoose>]
[-Options <MarkdownReaderOptions>]
[-Profile <OfficeIMO|CommonMark|GitHubFlavoredMarkdown|Portable>]
[-RestrictUrlSchemes <Boolean>]
-Text <String>
[<CommonParameters>]
```

[#](#member-a51876de4289d78483ad9d68)

Parameter set: `Text`

## Description

Returns heading level, text, resolved anchor, and the backing heading block.

## Examples

### Read headings from Markdown text.

```powershell
Get-OfficeMarkdownHeading -Text "# Title`n`n## Details"
```

Parses Markdown text and returns the document headings.

### Inspect a parsed Markdown document.

```powershell
Get-OfficeMarkdown -Path .\README.md | Get-OfficeMarkdownHeading -MinLevel 2
```

Returns headings from an existing Markdown document object.

## 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.

**-Anchor String optional**

Optional wildcard pattern matched against resolved heading anchors.

**-BaseUri String optional**

Base URI used to resolve and restrict relative Markdown links and images.

**-CaseSensitive SwitchParameter optional**

Use case-sensitive matching for text and anchor filters.

**-DisallowFileUrls Boolean optional**

Block file URLs while parsing Markdown links and images.

**-HeadingText String optional**

Optional wildcard pattern matched against heading text.

**-MaxInputCharacters Int32 optional**

Maximum Markdown input length accepted by the reader.

**-MaxLevel Int32 optional**

Maximum heading level to return.

**-MinLevel Int32 optional**

Minimum heading level to return.

**-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 used when parsing path or text input.

**-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.

**-Document MarkdownDoc requiredpipeline: True (ByValue)sets: Document**

Markdown document to inspect.

**-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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:A93A2898D56280BA3E3561130ED74C6BA22BF70B94F37E00980ADB20EF129972 -->
