Edit

Share via


Import-YamlCommandHelp

Imports Yaml help content into CommandHelp objects.

Syntax

Path (Default)

Import-YamlCommandHelp
    [-Path] <string[]>
    [-AsDictionary]
    [<CommonParameters>]

LiteralPath

Import-YamlCommandHelp
    -LiteralPath <string[]>
    [-AsDictionary]
    [<CommonParameters>]

Description

The command imports Yaml 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 Yaml 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.

Import-YamlCommandHelp -Path .\v2\yaml\*-*.yml | 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

-AsDictionary

By default this cmdlet returns CommandHelp objects. When you use this parameter. the cmdlet returns the same information as an OrderedDictionary object.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LiteralPath

Specifies a path to one or more Yaml command 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:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Path

The path to the Yaml command file. Specifies a path to one or more locations.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:True
DontShow:False
Aliases:FullName

Parameter sets

Path
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
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

OrderedDictionary

This cmdlet returns an OrderedDictionary object when you use the AsDictionary parameter.

Microsoft.PowerShell.PlatyPS.Model.CommandHelp

By default, this cmdlet returns CommandHelp objects.