Cmdlet
New-OfficeMarkdown
Creates a Markdown document using a DSL scriptblock.
Syntax
New-OfficeMarkdown
[[-Content] <ScriptBlock>]
[-ImageRenderingMode <RichMarkdown| PortableMarkdown| Html>]
[-LineEnding <String>]
[-NoSave]
[-PassThru]
[-Path] <String>
[-UnorderedListMarker <String>]
[-WriteOptions <MarkdownWriteOptions>]
[-WriteProfile <OfficeIMO| Portable| HtmlImage>]
[<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Runs the scriptblock against a Markdown document and saves it to disk unless -NoSave is specified.
Examples
Create a Markdown document with headings and a table.
New-OfficeMarkdown -Path .\README.md { MarkdownHeading -Level 1 -Text 'Report'; MarkdownTable -InputObject $data }Creates a README file with a heading and table content.
Create a report with multiple tables.
New-OfficeMarkdown -Path .\Report.md {
MarkdownHeading -Level 1 -Text 'Summary'
MarkdownTable -InputObject $summary
MarkdownHeading -Level 2 -Text 'Details'
MarkdownTable -InputObject $details
}Creates a report with two tables separated by headings.
Parameters
- -Content ScriptBlock
- DSL scriptblock describing Markdown content.
- -ImageRenderingMode MarkdownImageRenderingMode
- Controls how Markdown images are serialized.
- Possible values:
RichMarkdown,PortableMarkdown,Html - -LineEnding String
- Markdown line ending: CRLF, LF, CR, or a literal line ending string.
- -NoSave SwitchParameter
- Skip saving after executing the DSL.
- -PassThru SwitchParameter
- Emit a FileInfo for chaining.
- -Path String
- Destination path for the Markdown file.
- -UnorderedListMarker String
- Unordered list marker: '-', '*', or '+'.
- -WriteOptions MarkdownWriteOptions
- Optional Markdown writer options.
- -WriteProfile OfficeMarkdownWriteProfile
- Friendly Markdown writer profile.
- Possible values:
OfficeIMO,Portable,HtmlImage
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.