Cmdlet
New-OfficeMarkdown
Creates a live Markdown document, or atomically publishes a completed content block.
Syntax
New-OfficeMarkdown
[-Force]
[[-Path] <String>]
[<CommonParameters>]#Parameter set:
LiveNew-OfficeMarkdown
[-AllowLoss]
[-Content] <ScriptBlock>
[-Force]
[-ImageRenderingMode <RichMarkdown| PortableMarkdown| Html>]
[-LineEnding <LF| CRLF| CR>]
[-PassThru]
[-Path] <String>
[-Show]
[-UnorderedListMarker <-| *| +>]
[-WriteOptions <MarkdownSaveOptions>]
[-WriteProfile <OfficeIMO| Portable| HtmlImage>]
[<CommonParameters>]#Parameter set:
ContentExamples
Create a report in one block.
New-OfficeMarkdown -Path ./Report.md -PassThru { MarkdownHeading -Text 'Report' }Compose a live document before saving.
$document = New-OfficeMarkdown -Path ./Report.md
$document | MarkdownHeading -Text 'Report'
$document | Save-OfficeMarkdown
$document | Close-OfficeMarkdownParameters
- -Force SwitchParameter
- Allow an existing destination; a failed block preserves its original contents.
- -Path String
- Optional associated destination for a live document; required when a content block saves a file.
- -AllowLoss SwitchParameter
- Explicitly accept reductions reported by the content block's native save.
- -Content ScriptBlock
- Authoring block to complete before the document is atomically saved and closed.
- -ImageRenderingMode MarkdownImageRenderingMode
- Image serialization used when publishing a block.
- Possible values:
RichMarkdown,PortableMarkdown,Html - -LineEnding OfficeLineEnding
- Line endings used when publishing a block.
- Possible values:
LF,CRLF,CR - -PassThru SwitchParameter
- Return the saved FileInfo after a completed content block.
- -Show SwitchParameter
- Open the saved result in its registered application after the content block succeeds.
- -UnorderedListMarker String
- Unordered list marker used when publishing a block.
- Possible values:
-,*,+ - -WriteOptions MarkdownSaveOptions
- Native Markdown save settings or a hashtable, used when publishing a block.
- -WriteProfile OfficeMarkdownWriteProfile
- Writer profile used when publishing a block.
- 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.