Edit

Share via


Import-MarkdownCommandHelp

Imports Markdown help content into CommandHelp objects.

Syntax

Path (Default)

Import-MarkdownCommandHelp
    [-Path] <string[]>
    [<CommonParameters>]

LiteralPath

Import-MarkdownCommandHelp
    -LiteralPath <string[]>
    [<CommonParameters>]

Description

The command imports Markdown files containing command help and creates CommandHelp objects. The CommandHelp object is a structured representation of the help content that can be used to export to different formats.

Examples

Example 1 - Import all cmdlet Markdown files in a folder

The following example import cmdlet Markdown files in a folder and converts them to CommandHelp objects. These objects can be used to export to different formats.

$mdfiles = Measure-PlatyPSMarkdown -Path .\v2\Microsoft.PowerShell.PlatyPS\*.md
$mdfiles | Where-Object Filetype -match 'CommandHelp' |
    Import-MarkdownCommandHelp -Path {$_.FilePath} |
    Select-Object Title
Title
-----
Compare-CommandHelp
Export-MamlCommandHelp
Export-MarkdownCommandHelp
Export-MarkdownModuleFile
Export-YamlCommandHelp
Export-YamlModuleFile
Import-MamlHelp
Import-MarkdownCommandHelp
Import-MarkdownModuleFile
Import-YamlCommandHelp
Import-YamlModuleFile
Measure-PlatyPSMarkdown
New-CommandHelp
New-MarkdownCommandHelp
New-MarkdownModuleFile
Test-MarkdownCommandHelp
Update-CommandHelp
Update-MarkdownCommandHelp
Update-MarkdownModuleFile

Parameters

-LiteralPath

Specifies a path to one or more locations containing markdown files. The value of LiteralPath is used exactly as it's typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.

For more information, see about_Quoting_Rules.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:PSPath, LP

Parameter sets

LiteralPath
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Path

Specifies the path to an item. This cmdlet gets the item at the specified location. Wildcard characters are permitted. This parameter is required, but the parameter name Path is optional.

Use a dot (.) to specify the current location. Use the wildcard character (*) to specify all items in the current location.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:True
DontShow:False

Parameter sets

Path
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

Microsoft.PowerShell.PlatyPS.Model.CommandHelp