New-MarkdownCommandHelp
Creates Markdown help files for PowerShell modules and commands.
Syntax
New-MarkdownCommandHelp
-OutputFolder <string>
[-CommandInfo <CommandInfo[]>]
[-Encoding <Encoding>]
[-Force]
[-HelpUri <string>]
[-HelpInfoUri <string>]
[-HelpVersion <version>]
[-Locale <string>]
[-Metadata <hashtable>]
[-ModuleInfo <psmoduleinfo[]>]
[-WithModulePage]
[-AbbreviateParameterTypename]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Creates Markdown help files for PowerShell modules and commands.
Examples
Example 1 - Create Markdown help files for a module
$newMarkdownCommandHelpSplat = @{
ModuleInfo = Get-Module Microsoft.PowerShell.PlatyPS
OutputFolder = '.'
HelpVersion = '1.0.0.0'
WithModulePage = $true
}
New-MarkdownCommandHelp @newMarkdownCommandHelpSplat
Example 2 - Create Markdown help files from a list of commands
$newMarkdownCommandHelpSplat = @{
CommandInfo = Get-Command -Module Microsoft.PowerShell.PlatyPS
OutputFolder = '.'
HelpVersion = '1.0.0.0'
WithModulePage = $true
}
New-MarkdownCommandHelp @newMarkdownCommandHelpSplat
Parameters
-AbbreviateParameterTypename
By default, this command uses full type names in the parameter metadata and for the input and output types. When you use this parameter, the cmdlet outputs short type names.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CommandInfo
A list of one or more commands to create help for.
Type: | CommandInfo[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Encoding
The encoding used when creating the output files. If not specified, the cmdlet uses value specified
by $OutputEncoding
.
Type: | Encoding |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
By default, this command doesn't overwrite existing files. When you use this parameter, the cmdlet overwrites existing files.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HelpInfoUri
This parameter allows you to specify the URI used for updateable help. By default, the cmdlet uses the HelpInfoUri specified in the module manifest.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HelpUri
This parameter allows you to specify the URI used for online help. By default, the cmdlet uses the
URI defined in the [CmdletBinding()]
attribute for the command.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HelpVersion
This parameter allows you to specify the version of the help. The default value is 1.0.0.0
. This
version is written to the HelpInfo.xml
file that is used for updateable help.
Type: | Version |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Locale
This parameter allows you to specify the language locale for the help files. By default, the cmdlet
uses the current CultureInfo. Use the Get-Culture
cmdlet to see the current culture settings
on your system.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Metadata
The metadata to add to the frontmatter of the markdown file. The metadata is a hashtable where the
you specify the key and value pairs to add to the frontmatter. New key names are added to the
existing frontmatter. The values of existing keys are overwritten. You can't overwrite the values of
the document type
or PlatyPS schema version
keys. If these keys are present in the hashtable,
the cmdlet ignores the values and outputs a warning.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ModuleInfo
A list of one or more modules to create help for. The cmdlet creates Markdown help files for all commands in the module. The cmdlet creates a folder matching the name of the module in the output location. All Markdown files are written to the module folder.
Type: | PSModuleInfo[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-OutputFolder
Specifies the location of where the Markdown help files are written. The cmdlet creates a folder for each module being processed. If the target command isn't associated with a module, the cmdlet creates a the Markdown file in the root of the output folder.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet isn't run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WithModulePage
By default, this cmdlet only creates Markdown files for commands. When you use this parameter, the cmdlet creates a Markdown file for the module. This Markdown file contains a list of all commands in the module and metadata used to create the HelpInfo.xml file.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |