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.186
Language: C# Updated: 2026-11-04
Command

Show-ModuleDocumentation

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

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

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
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
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
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

Description

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

Example 1

Show-ModuleDocumentation -DocsPath 'C:\Path'

Parameters

-DisableTokenizer SwitchParameter optional
Disable code tokenizers and render code fences as plain text.
-DoNotShow SwitchParameter optional
Do not open the generated HTML after export.
-ExamplesLayout String optional
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 optional
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 optional
Convenience switch equal to -SkipRemote -SkipDependencies -SkipCommands.
-File String optional
Show a specific file by name (relative to module root or Internals) or full path.
-HeadingRules String optional
Heading rulers style. H1AndH2 draws rules for H1/H2, H1 for H1 only, None disables.
Possible values: H1, H1AndH2
-HelpAsCode SwitchParameter optional
Render command help inside fenced code blocks for uniform monospace formatting.
-HelpTimeoutSeconds Int32 optional
Per-command Get-Help timeout in seconds. Default 3.
-MaxCommands Int32 optional
Limit the number of commands rendered in the Commands tab. Default 100.
-Mode String optional
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: ModuleNamesets: ByName
Module name to display documentation for.
-Online SwitchParameter optional
Enable repository access (fetch remote docs using manifest defaults or -Repository* overrides).
-Open SwitchParameter optional
Open the generated HTML in the default shell handler after export.
-OutputPath String optionalaliases: ExportHtmlPath, Path
Output location for the generated HTML. Accepts a file path or an existing directory. Defaults to temp when omitted.
-PreferInternals SwitchParameter optional
Prefer Internals folder over module root when both contain the same file kind.
-RepositoryBranch String optional
Branch name to use when fetching remote docs. If omitted, the provider default branch is used.
-RepositoryPaths String[] optional
Repository-relative folders to enumerate and display (e.g., 'docs', 'articles'). Only .md/.markdown/.txt files are rendered.
-RepositoryToken String optional
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 optionalsets: ByName, ByModule
Exact version to select when multiple module versions are installed.
-ShowDuplicates SwitchParameter optional
Show both variants even when content is identical (root vs internals and local vs remote).
-SkipCommands SwitchParameter optional
Skip building the Commands tab (fast export).
-SkipDependencies SwitchParameter optional
Skip building the dependency list and graph.
-Module PSModuleInfo optionalpipeline: True (ByValue)aliases: InputObject, ModuleInfosets: ByModule
Module object to display documentation for. Alternative to -Name.
-DocsPath String optionalsets: ByPath
Direct path to a documentation folder containing README/CHANGELOG/etc.
-ModuleBase String optionalsets: ByBase
Path to a module root (folder that contains the module manifest). Useful for unpacked builds.

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.