Project

PSPublishModule

Build, test, version, sign, and publish PowerShell modules with reusable PowerForge pipelines.

Stars 48
Forks 16
PowerShell Gallery downloads 17,213
Release v3.0.169
Language: C# Updated: 2026-10-13

API Reference

Command

Show-ModuleDocumentation

Namespace PSPublishModule
Inputs
System.Management.Automation.PSModuleInfo System.String

Displays module documentation (README, CHANGELOG, LICENSE, Intro/Upgrade) in the console.

Remarks

Displays module documentation (README, CHANGELOG, LICENSE, Intro/Upgrade) in the console. Resolves documentation files from an installed module (root or Internals folder) and renders them with Spectre.Console. When local files are absent or when requested, it can fetch files directly from the module's repository specified by PrivateData.PSData.ProjectUri (GitHub or Azure DevOps), optionally using a Personal Access Token.

Examples

Authored help example

EXAMPLE 1


Show-ModuleDocumentation -DocsPath 'C:\Path'
        

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.

Syntax

Show-ModuleDocumentation [-DisableTokenizer] [-DoNotShow] [-ExamplesLayout <MamlDefault|ProseFirst|AllAsCode>] [-ExamplesMode <Auto|Raw|Maml>] [-Fast] [-File <String>] [-HeadingRules <H1|H1AndH2>] [-HelpAsCode] [-HelpTimeoutSeconds <Int32>] [-MaxCommands <Int32>] [-Mode <PreferLocal|PreferRemote|All>] [-Name <String>] [-Online] [-Open] [-OutputPath <String>] [-PreferInternals] [-RepositoryBranch <String>] [-RepositoryPaths <String[]>] [-RepositoryToken <String>] [-RequiredVersion <Version>] [-ShowDuplicates] [-SkipCommands] [-SkipDependencies] [<CommonParameters>]
#
Parameter set: ByName

Parameters

DisableTokenizer SwitchParameter optionalposition: namedpipeline: False
Disable code tokenizers and render code fences as plain text.
DoNotShow SwitchParameter optionalposition: namedpipeline: False
Do not open the generated HTML after export.
ExamplesLayout String optionalposition: namedpipeline: Falsevalues: 3
Controls how examples are rendered: ProseFirst (remarks then code), MamlDefault (code then remarks), or AllAsCode. Default is ProseFirst.
Possible values: MamlDefault, ProseFirst, AllAsCode
ExamplesMode String optionalposition: namedpipeline: Falsevalues: 3
Controls how Examples are sourced. Raw = parse the EXAMPLES section from Get-Help text; Maml = use structured help object; Auto = Raw then Maml.
Possible values: Auto, Raw, Maml
Fast SwitchParameter optionalposition: namedpipeline: False
Convenience switch equal to -SkipRemote -SkipDependencies -SkipCommands.
File String optionalposition: namedpipeline: False
Show a specific file by name (relative to module root or Internals) or full path.
HeadingRules String optionalposition: namedpipeline: Falsevalues: 2
Heading rulers style. H1AndH2 draws rules for H1/H2, H1 for H1 only, None disables.
Possible values: H1, H1AndH2
HelpAsCode SwitchParameter optionalposition: namedpipeline: False
Render command help inside fenced code blocks for uniform monospace formatting.
HelpTimeoutSeconds Int32 optionalposition: namedpipeline: False
Per-command Get-Help timeout in seconds. Default 3.
MaxCommands Int32 optionalposition: namedpipeline: False
Limit the number of commands rendered in the Commands tab. Default 100.
Mode String optionalposition: namedpipeline: Falsevalues: 3
Selection policy for standard tabs when Local and Remote exist (applies only when -Online): PreferLocal (default), PreferRemote, or All.
Possible values: PreferLocal, PreferRemote, All
Name String optionalposition: 0pipeline: True (ByValue, ByPropertyName)aliases: ModuleName
Module name to display documentation for.
Online SwitchParameter optionalposition: namedpipeline: False
Enable repository access (fetch remote docs using manifest defaults or -Repository* overrides).
Open SwitchParameter optionalposition: namedpipeline: False
Open the generated HTML in the default shell handler after export.
OutputPath String optionalposition: namedpipeline: Falsealiases: ExportHtmlPath, Path
Output location for the generated HTML. Accepts a file path or an existing directory. Defaults to temp when omitted.
PreferInternals SwitchParameter optionalposition: namedpipeline: False
Prefer Internals folder over module root when both contain the same file kind.
RepositoryBranch String optionalposition: namedpipeline: False
Branch name to use when fetching remote docs. If omitted, the provider default branch is used.
RepositoryPaths String[] optionalposition: namedpipeline: False
Repository-relative folders to enumerate and display (e.g., 'docs', 'articles'). Only .md/.markdown/.txt files are rendered.
RepositoryToken String optionalposition: namedpipeline: False
Personal Access Token for private repositories. Alternatively set environment variables: GitHub: PG_GITHUB_TOKEN or GITHUB_TOKEN; Azure DevOps: PG_AZDO_PAT or AZURE_DEVOPS_EXT_PAT.
RequiredVersion Version optionalposition: namedpipeline: False
Exact version to select when multiple module versions are installed.
ShowDuplicates SwitchParameter optionalposition: namedpipeline: False
Show both variants even when content is identical (root vs internals and local vs remote).
SkipCommands SwitchParameter optionalposition: namedpipeline: False
Skip building the Commands tab (fast export).
SkipDependencies SwitchParameter optionalposition: namedpipeline: False
Skip building the dependency list and graph.
Show-ModuleDocumentation [-DisableTokenizer] [-DoNotShow] [-ExamplesLayout <MamlDefault|ProseFirst|AllAsCode>] [-ExamplesMode <Auto|Raw|Maml>] [-Fast] [-File <String>] [-HeadingRules <H1|H1AndH2>] [-HelpAsCode] [-HelpTimeoutSeconds <Int32>] [-MaxCommands <Int32>] [-Mode <PreferLocal|PreferRemote|All>] [-Module <PSModuleInfo>] [-Online] [-Open] [-OutputPath <String>] [-PreferInternals] [-RepositoryBranch <String>] [-RepositoryPaths <String[]>] [-RepositoryToken <String>] [-RequiredVersion <Version>] [-ShowDuplicates] [-SkipCommands] [-SkipDependencies] [<CommonParameters>]
#
Parameter set: ByModule

Parameters

DisableTokenizer SwitchParameter optionalposition: namedpipeline: False
Disable code tokenizers and render code fences as plain text.
DoNotShow SwitchParameter optionalposition: namedpipeline: False
Do not open the generated HTML after export.
ExamplesLayout String optionalposition: namedpipeline: Falsevalues: 3
Controls how examples are rendered: ProseFirst (remarks then code), MamlDefault (code then remarks), or AllAsCode. Default is ProseFirst.
Possible values: MamlDefault, ProseFirst, AllAsCode
ExamplesMode String optionalposition: namedpipeline: Falsevalues: 3
Controls how Examples are sourced. Raw = parse the EXAMPLES section from Get-Help text; Maml = use structured help object; Auto = Raw then Maml.
Possible values: Auto, Raw, Maml
Fast SwitchParameter optionalposition: namedpipeline: False
Convenience switch equal to -SkipRemote -SkipDependencies -SkipCommands.
File String optionalposition: namedpipeline: False
Show a specific file by name (relative to module root or Internals) or full path.
HeadingRules String optionalposition: namedpipeline: Falsevalues: 2
Heading rulers style. H1AndH2 draws rules for H1/H2, H1 for H1 only, None disables.
Possible values: H1, H1AndH2
HelpAsCode SwitchParameter optionalposition: namedpipeline: False
Render command help inside fenced code blocks for uniform monospace formatting.
HelpTimeoutSeconds Int32 optionalposition: namedpipeline: False
Per-command Get-Help timeout in seconds. Default 3.
MaxCommands Int32 optionalposition: namedpipeline: False
Limit the number of commands rendered in the Commands tab. Default 100.
Mode String optionalposition: namedpipeline: Falsevalues: 3
Selection policy for standard tabs when Local and Remote exist (applies only when -Online): PreferLocal (default), PreferRemote, or All.
Possible values: PreferLocal, PreferRemote, All
Module PSModuleInfo optionalposition: namedpipeline: True (ByValue)aliases: InputObject, ModuleInfo
Module object to display documentation for. Alternative to -Name.
Online SwitchParameter optionalposition: namedpipeline: False
Enable repository access (fetch remote docs using manifest defaults or -Repository* overrides).
Open SwitchParameter optionalposition: namedpipeline: False
Open the generated HTML in the default shell handler after export.
OutputPath String optionalposition: namedpipeline: Falsealiases: ExportHtmlPath, Path
Output location for the generated HTML. Accepts a file path or an existing directory. Defaults to temp when omitted.
PreferInternals SwitchParameter optionalposition: namedpipeline: False
Prefer Internals folder over module root when both contain the same file kind.
RepositoryBranch String optionalposition: namedpipeline: False
Branch name to use when fetching remote docs. If omitted, the provider default branch is used.
RepositoryPaths String[] optionalposition: namedpipeline: False
Repository-relative folders to enumerate and display (e.g., 'docs', 'articles'). Only .md/.markdown/.txt files are rendered.
RepositoryToken String optionalposition: namedpipeline: False
Personal Access Token for private repositories. Alternatively set environment variables: GitHub: PG_GITHUB_TOKEN or GITHUB_TOKEN; Azure DevOps: PG_AZDO_PAT or AZURE_DEVOPS_EXT_PAT.
RequiredVersion Version optionalposition: namedpipeline: False
Exact version to select when multiple module versions are installed.
ShowDuplicates SwitchParameter optionalposition: namedpipeline: False
Show both variants even when content is identical (root vs internals and local vs remote).
SkipCommands SwitchParameter optionalposition: namedpipeline: False
Skip building the Commands tab (fast export).
SkipDependencies SwitchParameter optionalposition: namedpipeline: False
Skip building the dependency list and graph.
Show-ModuleDocumentation [-DisableTokenizer] [-DocsPath <String>] [-DoNotShow] [-ExamplesLayout <MamlDefault|ProseFirst|AllAsCode>] [-ExamplesMode <Auto|Raw|Maml>] [-Fast] [-File <String>] [-HeadingRules <H1|H1AndH2>] [-HelpAsCode] [-HelpTimeoutSeconds <Int32>] [-MaxCommands <Int32>] [-Mode <PreferLocal|PreferRemote|All>] [-Online] [-Open] [-OutputPath <String>] [-PreferInternals] [-RepositoryBranch <String>] [-RepositoryPaths <String[]>] [-RepositoryToken <String>] [-ShowDuplicates] [-SkipCommands] [-SkipDependencies] [<CommonParameters>]
#
Parameter set: ByPath

Parameters

DisableTokenizer SwitchParameter optionalposition: namedpipeline: False
Disable code tokenizers and render code fences as plain text.
DocsPath String optionalposition: namedpipeline: False
Direct path to a documentation folder containing README/CHANGELOG/etc.
DoNotShow SwitchParameter optionalposition: namedpipeline: False
Do not open the generated HTML after export.
ExamplesLayout String optionalposition: namedpipeline: Falsevalues: 3
Controls how examples are rendered: ProseFirst (remarks then code), MamlDefault (code then remarks), or AllAsCode. Default is ProseFirst.
Possible values: MamlDefault, ProseFirst, AllAsCode
ExamplesMode String optionalposition: namedpipeline: Falsevalues: 3
Controls how Examples are sourced. Raw = parse the EXAMPLES section from Get-Help text; Maml = use structured help object; Auto = Raw then Maml.
Possible values: Auto, Raw, Maml
Fast SwitchParameter optionalposition: namedpipeline: False
Convenience switch equal to -SkipRemote -SkipDependencies -SkipCommands.
File String optionalposition: namedpipeline: False
Show a specific file by name (relative to module root or Internals) or full path.
HeadingRules String optionalposition: namedpipeline: Falsevalues: 2
Heading rulers style. H1AndH2 draws rules for H1/H2, H1 for H1 only, None disables.
Possible values: H1, H1AndH2
HelpAsCode SwitchParameter optionalposition: namedpipeline: False
Render command help inside fenced code blocks for uniform monospace formatting.
HelpTimeoutSeconds Int32 optionalposition: namedpipeline: False
Per-command Get-Help timeout in seconds. Default 3.
MaxCommands Int32 optionalposition: namedpipeline: False
Limit the number of commands rendered in the Commands tab. Default 100.
Mode String optionalposition: namedpipeline: Falsevalues: 3
Selection policy for standard tabs when Local and Remote exist (applies only when -Online): PreferLocal (default), PreferRemote, or All.
Possible values: PreferLocal, PreferRemote, All
Online SwitchParameter optionalposition: namedpipeline: False
Enable repository access (fetch remote docs using manifest defaults or -Repository* overrides).
Open SwitchParameter optionalposition: namedpipeline: False
Open the generated HTML in the default shell handler after export.
OutputPath String optionalposition: namedpipeline: Falsealiases: ExportHtmlPath, Path
Output location for the generated HTML. Accepts a file path or an existing directory. Defaults to temp when omitted.
PreferInternals SwitchParameter optionalposition: namedpipeline: False
Prefer Internals folder over module root when both contain the same file kind.
RepositoryBranch String optionalposition: namedpipeline: False
Branch name to use when fetching remote docs. If omitted, the provider default branch is used.
RepositoryPaths String[] optionalposition: namedpipeline: False
Repository-relative folders to enumerate and display (e.g., 'docs', 'articles'). Only .md/.markdown/.txt files are rendered.
RepositoryToken String optionalposition: namedpipeline: False
Personal Access Token for private repositories. Alternatively set environment variables: GitHub: PG_GITHUB_TOKEN or GITHUB_TOKEN; Azure DevOps: PG_AZDO_PAT or AZURE_DEVOPS_EXT_PAT.
ShowDuplicates SwitchParameter optionalposition: namedpipeline: False
Show both variants even when content is identical (root vs internals and local vs remote).
SkipCommands SwitchParameter optionalposition: namedpipeline: False
Skip building the Commands tab (fast export).
SkipDependencies SwitchParameter optionalposition: namedpipeline: False
Skip building the dependency list and graph.
Show-ModuleDocumentation [-DisableTokenizer] [-DoNotShow] [-ExamplesLayout <MamlDefault|ProseFirst|AllAsCode>] [-ExamplesMode <Auto|Raw|Maml>] [-Fast] [-File <String>] [-HeadingRules <H1|H1AndH2>] [-HelpAsCode] [-HelpTimeoutSeconds <Int32>] [-MaxCommands <Int32>] [-Mode <PreferLocal|PreferRemote|All>] [-ModuleBase <String>] [-Online] [-Open] [-OutputPath <String>] [-PreferInternals] [-RepositoryBranch <String>] [-RepositoryPaths <String[]>] [-RepositoryToken <String>] [-ShowDuplicates] [-SkipCommands] [-SkipDependencies] [<CommonParameters>]
#
Parameter set: ByBase

Parameters

DisableTokenizer SwitchParameter optionalposition: namedpipeline: False
Disable code tokenizers and render code fences as plain text.
DoNotShow SwitchParameter optionalposition: namedpipeline: False
Do not open the generated HTML after export.
ExamplesLayout String optionalposition: namedpipeline: Falsevalues: 3
Controls how examples are rendered: ProseFirst (remarks then code), MamlDefault (code then remarks), or AllAsCode. Default is ProseFirst.
Possible values: MamlDefault, ProseFirst, AllAsCode
ExamplesMode String optionalposition: namedpipeline: Falsevalues: 3
Controls how Examples are sourced. Raw = parse the EXAMPLES section from Get-Help text; Maml = use structured help object; Auto = Raw then Maml.
Possible values: Auto, Raw, Maml
Fast SwitchParameter optionalposition: namedpipeline: False
Convenience switch equal to -SkipRemote -SkipDependencies -SkipCommands.
File String optionalposition: namedpipeline: False
Show a specific file by name (relative to module root or Internals) or full path.
HeadingRules String optionalposition: namedpipeline: Falsevalues: 2
Heading rulers style. H1AndH2 draws rules for H1/H2, H1 for H1 only, None disables.
Possible values: H1, H1AndH2
HelpAsCode SwitchParameter optionalposition: namedpipeline: False
Render command help inside fenced code blocks for uniform monospace formatting.
HelpTimeoutSeconds Int32 optionalposition: namedpipeline: False
Per-command Get-Help timeout in seconds. Default 3.
MaxCommands Int32 optionalposition: namedpipeline: False
Limit the number of commands rendered in the Commands tab. Default 100.
Mode String optionalposition: namedpipeline: Falsevalues: 3
Selection policy for standard tabs when Local and Remote exist (applies only when -Online): PreferLocal (default), PreferRemote, or All.
Possible values: PreferLocal, PreferRemote, All
ModuleBase String optionalposition: namedpipeline: False
Path to a module root (folder that contains the module manifest). Useful for unpacked builds.
Online SwitchParameter optionalposition: namedpipeline: False
Enable repository access (fetch remote docs using manifest defaults or -Repository* overrides).
Open SwitchParameter optionalposition: namedpipeline: False
Open the generated HTML in the default shell handler after export.
OutputPath String optionalposition: namedpipeline: Falsealiases: ExportHtmlPath, Path
Output location for the generated HTML. Accepts a file path or an existing directory. Defaults to temp when omitted.
PreferInternals SwitchParameter optionalposition: namedpipeline: False
Prefer Internals folder over module root when both contain the same file kind.
RepositoryBranch String optionalposition: namedpipeline: False
Branch name to use when fetching remote docs. If omitted, the provider default branch is used.
RepositoryPaths String[] optionalposition: namedpipeline: False
Repository-relative folders to enumerate and display (e.g., 'docs', 'articles'). Only .md/.markdown/.txt files are rendered.
RepositoryToken String optionalposition: namedpipeline: False
Personal Access Token for private repositories. Alternatively set environment variables: GitHub: PG_GITHUB_TOKEN or GITHUB_TOKEN; Azure DevOps: PG_AZDO_PAT or AZURE_DEVOPS_EXT_PAT.
ShowDuplicates SwitchParameter optionalposition: namedpipeline: False
Show both variants even when content is identical (root vs internals and local vs remote).
SkipCommands SwitchParameter optionalposition: namedpipeline: False
Skip building the Commands tab (fast export).
SkipDependencies SwitchParameter optionalposition: namedpipeline: False
Skip building the dependency list and graph.