# New-HTMLMarkdown

Creates HTML content from Markdown text with customizable options.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

Creates HTML content from Markdown text with customizable options.

## Syntax

```
New-HTMLMarkdown
[-DisableTables]
[-EnableBackslashEscapes]
[-EnableBackslashEscapesHTMLTags]
[-EnableEmoji]
[-EnableEncodeEmails]
[-EnableGithubCodeBlocks]
[-EnableMoreStyling]
[-EnableOpenLinksInNewWindow]
[-EnableRequireSpaceBeforeHeadingText]
[-EnableSimpleLineBreaks]
[-EnableStrikethrough]
[-EnableTaskLists]
[-EnableTOC]
[-Encoding <String>]
-FilePath <String>
[-HeaderLevelStart <Int32>]
[-Id <String>]
[-omitExtraWLInCodeBlocks]
[-SanitezeHTML]
[<CommonParameters>]
```

[#](#member-36b221f4d8fab4cef64eb23f)

Parameter set: `FilePath`

```
New-HTMLMarkdown
[-DisableTables]
[-EnableBackslashEscapes]
[-EnableBackslashEscapesHTMLTags]
[-EnableEmoji]
[-EnableEncodeEmails]
[-EnableGithubCodeBlocks]
[-EnableMoreStyling]
[-EnableOpenLinksInNewWindow]
[-EnableRequireSpaceBeforeHeadingText]
[-EnableSimpleLineBreaks]
[-EnableStrikethrough]
[-EnableTaskLists]
[-EnableTOC]
[-Encoding <String>]
[-HeaderLevelStart <Int32>]
[-Id <String>]
[-omitExtraWLInCodeBlocks]
[-SanitezeHTML]
[-ScriptBlock] <ScriptBlock>
[<CommonParameters>]
```

[#](#member-65ca590220560353fce685eb)

Parameter set: `ScriptBlock`

```
New-HTMLMarkdown
-Content <Array>
[-DisableTables]
[-EnableBackslashEscapes]
[-EnableBackslashEscapesHTMLTags]
[-EnableEmoji]
[-EnableEncodeEmails]
[-EnableGithubCodeBlocks]
[-EnableMoreStyling]
[-EnableOpenLinksInNewWindow]
[-EnableRequireSpaceBeforeHeadingText]
[-EnableSimpleLineBreaks]
[-EnableStrikethrough]
[-EnableTaskLists]
[-EnableTOC]
[-Encoding <String>]
[-HeaderLevelStart <Int32>]
[-Id <String>]
[-omitExtraWLInCodeBlocks]
[-SanitezeHTML]
[<CommonParameters>]
```

[#](#member-299f656dd76d703bb5b7ee99)

Parameter set: `Content`

## Description

The New-HTMLMarkdown function converts Markdown text to HTML content with various customization options such as strikethrough, emojis, code block styling, table of contents, and more.

## Examples

### Example 1

```powershell
New-HTMLMarkdown -FilePath "C:\Markdown\example.md" -EnableStrikethrough -EnableEmoji -EnableTOC
```

Converts the Markdown content from the file "example.md" to HTML with strikethrough, emojis, and a table of contents.

### Example 2

```powershell
$MarkdownContent = @("## Title", "This is a **bold** text.")
New-HTMLMarkdown -Content $MarkdownContent -EnableMoreStyling -EnableTaskLists
```

Converts the Markdown content in the array with additional styling and task list support.

## Parameters

**-DisableTables SwitchParameter optional**

Switch parameter to disable table rendering.

**-EnableBackslashEscapes SwitchParameter optional**

Switch parameter to enable backslash escapes.

**-EnableBackslashEscapesHTMLTags SwitchParameter optional**

Switch parameter to enable backslash escapes for HTML tags.

**-EnableEmoji SwitchParameter optional**

Switch parameter to enable emoji support.

**-EnableEncodeEmails SwitchParameter optional**

Switch parameter to enable email encoding.

**-EnableGithubCodeBlocks SwitchParameter optional**

Switch parameter to enable GitHub-style code blocks.

**-EnableMoreStyling SwitchParameter optional**

Switch parameter to enable additional styling options.

**-EnableOpenLinksInNewWindow SwitchParameter optional**

Switch parameter to open links in a new window.

**-EnableRequireSpaceBeforeHeadingText SwitchParameter optional**

Switch parameter to require space before heading text.

**-EnableSimpleLineBreaks SwitchParameter optional**

Switch parameter to enable simple line breaks.

**-EnableStrikethrough SwitchParameter optional**

Switch parameter to enable strikethrough styling.

**-EnableTaskLists SwitchParameter optional**

Switch parameter to enable task lists in Markdown.

**-EnableTOC SwitchParameter optional**

Switch parameter to enable table of contents generation.

**-Encoding String optional**

Specifies the encoding for reading the Markdown content file. Default is 'UTF8'.

**-FilePath String requiredsets: FilePath**

Specifies the path to a file containing Markdown content to convert.

**-HeaderLevelStart Int32 optional**

Specifies the starting header level for Markdown content.

**-Id String optional**

Specifies the ID attribute for the HTML container.

**-omitExtraWLInCodeBlocks SwitchParameter optional**

Switch parameter to omit extra whitespace in code blocks.

**-SanitezeHTML SwitchParameter optional**

Switch parameter to sanitize HTML content.

**-ScriptBlock ScriptBlock requiredposition: 0sets: ScriptBlock**

Specifies a script block containing Markdown content to convert.

**-Content Array requiredsets: Content**

Specifies an array of Markdown content to convert.

## 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:03BF9E32A52193949D803DA811A2E04069743D6CDCBCEE08796D35DABD22F2C9 -->
