# Add-OfficeMarkdownFrontMatter

Adds YAML front matter to 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 

Aliases: MarkdownFrontMatter

**Module**

`PSWriteOffice`

**Aliases**

`MarkdownFrontMatter`

**Inputs**

`OfficeIMO.Markdown.MarkdownDoc`

**Outputs**

`OfficeIMO.Markdown.MarkdownDoc`

**Source**

[AddOfficeMarkdownFrontMatterCommand.cs:21](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Markdown/AddOfficeMarkdownFrontMatterCommand.cs#L21) 

Adds YAML front matter to a Markdown document.

## Syntax

```
Add-OfficeMarkdownFrontMatter
[-InputObject] <Object>
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officemarkdownfrontmatter-object-switchparameter)

Parameter set: `Context`

```
Add-OfficeMarkdownFrontMatter
-Document <MarkdownDoc>
[-InputObject] <Object>
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officemarkdownfrontmatter-markdowndoc-object-switchparameter)

Parameter set: `Document`

## Examples

### Add front matter from a hashtable.

```powershell
MarkdownFrontMatter -InputObject @{ title = 'Weekly Report'; tags = @('ops','summary') }
```

Sets the document header using the supplied key/value pairs.

## Parameters

**-InputObject Object requiredposition: 0aliases: Data**

Front matter data expressed as a hashtable or object.

**-PassThru SwitchParameter optional**

Emit the updated Markdown document.

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

Markdown document to update outside the DSL context.

## 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:A682D5095537BBCFA4F7F868DC5B1F3CB34BB5E77BC341BBF61F08ED0980D590 -->
