Import-YamlModuleFile
Imports a Yaml module file into a ModuleHelp object.
Syntax
Path (Default)
Import-YamlModuleFile
[-Path] <string[]>
[-AsDictionary]
[<CommonParameters>]
LiteralPath
Import-YamlModuleFile
-LiteralPath <string[]>
[-AsDictionary]
[<CommonParameters>]
Description
The command imports Yaml files containing module help and creates ModuleHelp objects. The ModuleHelp object is a structured representation of the help content that can be used to export to different formats.
Examples
Example 1 - Import a Yaml module file to a **ModuleHelp** object
Import-YamlModuleFile .\v2\yaml\Microsoft.PowerShell.PlatyPS.yml
Metadata : {[document type, module], [HelpInfoUri, ], [Locale, en-US], [Module Guid,
0bdcabef-a4b7-4a6d-bf7e-d879817ebbff]…}
Title : Microsoft.PowerShell.PlatyPS Module
Module : Microsoft.PowerShell.PlatyPS
ModuleGuid : 0bdcabef-a4b7-4a6d-bf7e-d879817ebbff
Description : This module contains cmdlets to help with the creation help content for PowerShell commands.
Locale : en-US
CommandGroups : {Microsoft.PowerShell.PlatyPS.ModuleCommandGroup}
Diagnostics : Microsoft.PowerShell.PlatyPS.Model.Diagnostics
Parameters
-AsDictionary
By default, the command returns a ModuleHelp object. When you use this parameter, the command returns the ModuleHelp data a dictionary 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 module 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 a path to one or more locations containing Yaml module files.
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.