Cmdlet
Add-OfficeMarkdownCode
Adds a Markdown code block.
Syntax
Examples
Add a PowerShell command block to documentation.
$script = @(
'Import-Module PSWriteOffice'
'Get-OfficeExcelSummary -Path .\report.xlsx'
) -join [Environment]::NewLine
New-OfficeMarkdown -Path .\Cookbook.md {
Add-OfficeMarkdownHeading -Level 2 -Text 'Workbook summary'
Add-OfficeMarkdownCode -Language 'powershell' -Content $script
}Appends a fenced code block with a language identifier.
Parameters
- -Content String
- Code content.
- -Language String
- Code language identifier.
- -PassThru SwitchParameter
- Emit the Markdown document after appending the code block.
- -Document MarkdownDoc
- 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.