Evotec

Project

PSWriteOffice

PSWriteOffice is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 144
Forks 12
Open issues 16
PowerShell Gallery downloads 150,904
Release v0.2.0
Language: C# Updated: 2026-04-06

API Reference

Cmdlet

Add-OfficeMarkdownCode

Namespace PSWriteOffice
Inputs
OfficeIMO.Markdown.MarkdownDoc
Outputs
OfficeIMO.Markdown.MarkdownDoc

Adds a Markdown code block.

Remarks

Adds a Markdown code block.

Examples

Authored help example

Add a PowerShell code block.

PS>


MarkdownCode -Language 'powershell' -Content 'Get-Process'
        

Appends a fenced code block to the document.

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

Add-OfficeMarkdownCode -Content <String> [-Language <String>] [-PassThru] [<CommonParameters>]
#
Parameter set: Context

Parameters

Content String requiredposition: 1pipeline: False
Code content.
Language String optionalposition: 0pipeline: False
Code language identifier.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the Markdown document after appending the code block.

Outputs

OfficeIMO.Markdown.MarkdownDoc

Add-OfficeMarkdownCode -Content <String> -Document <MarkdownDoc> [-Language <String>] [-PassThru] [<CommonParameters>]
#
Parameter set: Document

Parameters

Content String requiredposition: 1pipeline: False
Code content.
Document MarkdownDoc requiredposition: namedpipeline: True (ByValue)
Markdown document to update outside the DSL context.
Language String optionalposition: 0pipeline: False
Code language identifier.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the Markdown document after appending the code block.

Outputs

OfficeIMO.Markdown.MarkdownDoc