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

Get-ModuleDocumentation

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

Gets module documentation (README, CHANGELOG, LICENSE, Intro/Upgrade) and renders it in the console.

Remarks

Gets module documentation (README, CHANGELOG, LICENSE, Intro/Upgrade) and renders it 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, it will backfill from the module's repository specified by PrivateData.PSData.ProjectUri (GitHub or Azure DevOps), using a token when necessary.

Examples

Authored help example

EXAMPLE 1


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

Get-ModuleDocumentation [-All] [-Changelog] [-DefaultCodeLanguage <Auto|PowerShell|Json>] [-File <String>] [-Intro] [-JsonRenderer <Auto|Spectre|System>] [-License] [-Links] [-List] [-Name <String>] [-Online] [-PreferInternals] [-Raw] [-Readme] [-RepositoryBranch <String>] [-RepositoryPaths <String[]>] [-RepositoryToken <String>] [-RequiredVersion <Version>] [-Type <Default>] [-Upgrade] [<CommonParameters>]
#
Parameter set: ByName

Parameters

All SwitchParameter optionalposition: namedpipeline: False
Convenience switch to show Intro, README, CHANGELOG and LICENSE in order.
Changelog SwitchParameter optionalposition: namedpipeline: False
Show CHANGELOG.*.
DefaultCodeLanguage String optionalposition: namedpipeline: Falsevalues: 3
Default language for unlabeled code fences (Auto, PowerShell, Json, None).
Possible values: Auto, PowerShell, Json
File String optionalposition: namedpipeline: False
Show a specific file by name (relative to module root or Internals) or full path.
Intro SwitchParameter optionalposition: namedpipeline: False
Show configured IntroText/IntroFile (from Delivery metadata).
JsonRenderer String optionalposition: namedpipeline: Falsevalues: 3
Select JSON renderer for fenced JSON blocks: Auto, Spectre, or System.
Possible values: Auto, Spectre, System
License SwitchParameter optionalposition: namedpipeline: False
Show LICENSE.*.
Links SwitchParameter optionalposition: namedpipeline: False
Show configured ImportantLinks from Delivery metadata.
List SwitchParameter optionalposition: namedpipeline: False
List discovered documentation files (without rendering).
Name String optionalposition: 0pipeline: True (ByValue, ByPropertyName)aliases: ModuleName
Module name to display documentation for.
Online SwitchParameter optionalposition: namedpipeline: False
Enable repository access for remote documentation fallback and repository path enumeration.
PreferInternals SwitchParameter optionalposition: namedpipeline: False
Prefer Internals folder over module root when both contain the same file kind.
Raw SwitchParameter optionalposition: namedpipeline: False
Print raw file content without Markdown rendering.
Readme SwitchParameter optionalposition: namedpipeline: False
Show README.*.
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. Env fallbacks: PG_GITHUB_TOKEN/GITHUB_TOKEN or PG_AZDO_PAT/AZURE_DEVOPS_EXT_PAT.
RequiredVersion Version optionalposition: namedpipeline: False
Exact version to select when multiple module versions are installed.
Type DocumentationSelection optionalposition: namedpipeline: Falsevalues: 8
High-level selection of which documents to show. Overrides granular switches when specified.
Possible values: Default, Intro, Readme, Changelog, License, Upgrade, All, Links
Upgrade SwitchParameter optionalposition: namedpipeline: False
Show configured UpgradeText/UpgradeFile (from Delivery metadata or UPGRADE.*).
Get-ModuleDocumentation [-All] [-Changelog] [-DefaultCodeLanguage <Auto|PowerShell|Json>] [-File <String>] [-Intro] [-JsonRenderer <Auto|Spectre|System>] [-License] [-Links] [-List] [-Module <PSModuleInfo>] [-Online] [-PreferInternals] [-Raw] [-Readme] [-RepositoryBranch <String>] [-RepositoryPaths <String[]>] [-RepositoryToken <String>] [-RequiredVersion <Version>] [-Type <Default>] [-Upgrade] [<CommonParameters>]
#
Parameter set: ByModule

Parameters

All SwitchParameter optionalposition: namedpipeline: False
Convenience switch to show Intro, README, CHANGELOG and LICENSE in order.
Changelog SwitchParameter optionalposition: namedpipeline: False
Show CHANGELOG.*.
DefaultCodeLanguage String optionalposition: namedpipeline: Falsevalues: 3
Default language for unlabeled code fences (Auto, PowerShell, Json, None).
Possible values: Auto, PowerShell, Json
File String optionalposition: namedpipeline: False
Show a specific file by name (relative to module root or Internals) or full path.
Intro SwitchParameter optionalposition: namedpipeline: False
Show configured IntroText/IntroFile (from Delivery metadata).
JsonRenderer String optionalposition: namedpipeline: Falsevalues: 3
Select JSON renderer for fenced JSON blocks: Auto, Spectre, or System.
Possible values: Auto, Spectre, System
License SwitchParameter optionalposition: namedpipeline: False
Show LICENSE.*.
Links SwitchParameter optionalposition: namedpipeline: False
Show configured ImportantLinks from Delivery metadata.
List SwitchParameter optionalposition: namedpipeline: False
List discovered documentation files (without rendering).
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 for remote documentation fallback and repository path enumeration.
PreferInternals SwitchParameter optionalposition: namedpipeline: False
Prefer Internals folder over module root when both contain the same file kind.
Raw SwitchParameter optionalposition: namedpipeline: False
Print raw file content without Markdown rendering.
Readme SwitchParameter optionalposition: namedpipeline: False
Show README.*.
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. Env fallbacks: PG_GITHUB_TOKEN/GITHUB_TOKEN or PG_AZDO_PAT/AZURE_DEVOPS_EXT_PAT.
RequiredVersion Version optionalposition: namedpipeline: False
Exact version to select when multiple module versions are installed.
Type DocumentationSelection optionalposition: namedpipeline: Falsevalues: 8
High-level selection of which documents to show. Overrides granular switches when specified.
Possible values: Default, Intro, Readme, Changelog, License, Upgrade, All, Links
Upgrade SwitchParameter optionalposition: namedpipeline: False
Show configured UpgradeText/UpgradeFile (from Delivery metadata or UPGRADE.*).
Get-ModuleDocumentation [-All] [-Changelog] [-DefaultCodeLanguage <Auto|PowerShell|Json>] [-DocsPath <String>] [-File <String>] [-Intro] [-JsonRenderer <Auto|Spectre|System>] [-License] [-Links] [-List] [-Online] [-PreferInternals] [-Raw] [-Readme] [-RepositoryBranch <String>] [-RepositoryPaths <String[]>] [-RepositoryToken <String>] [-Type <Default>] [-Upgrade] [<CommonParameters>]
#
Parameter set: ByPath

Parameters

All SwitchParameter optionalposition: namedpipeline: False
Convenience switch to show Intro, README, CHANGELOG and LICENSE in order.
Changelog SwitchParameter optionalposition: namedpipeline: False
Show CHANGELOG.*.
DefaultCodeLanguage String optionalposition: namedpipeline: Falsevalues: 3
Default language for unlabeled code fences (Auto, PowerShell, Json, None).
Possible values: Auto, PowerShell, Json
DocsPath String optionalposition: namedpipeline: False
Direct path to a documentation folder containing README/CHANGELOG/etc.
File String optionalposition: namedpipeline: False
Show a specific file by name (relative to module root or Internals) or full path.
Intro SwitchParameter optionalposition: namedpipeline: False
Show configured IntroText/IntroFile (from Delivery metadata).
JsonRenderer String optionalposition: namedpipeline: Falsevalues: 3
Select JSON renderer for fenced JSON blocks: Auto, Spectre, or System.
Possible values: Auto, Spectre, System
License SwitchParameter optionalposition: namedpipeline: False
Show LICENSE.*.
Links SwitchParameter optionalposition: namedpipeline: False
Show configured ImportantLinks from Delivery metadata.
List SwitchParameter optionalposition: namedpipeline: False
List discovered documentation files (without rendering).
Online SwitchParameter optionalposition: namedpipeline: False
Enable repository access for remote documentation fallback and repository path enumeration.
PreferInternals SwitchParameter optionalposition: namedpipeline: False
Prefer Internals folder over module root when both contain the same file kind.
Raw SwitchParameter optionalposition: namedpipeline: False
Print raw file content without Markdown rendering.
Readme SwitchParameter optionalposition: namedpipeline: False
Show README.*.
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. Env fallbacks: PG_GITHUB_TOKEN/GITHUB_TOKEN or PG_AZDO_PAT/AZURE_DEVOPS_EXT_PAT.
Type DocumentationSelection optionalposition: namedpipeline: Falsevalues: 8
High-level selection of which documents to show. Overrides granular switches when specified.
Possible values: Default, Intro, Readme, Changelog, License, Upgrade, All, Links
Upgrade SwitchParameter optionalposition: namedpipeline: False
Show configured UpgradeText/UpgradeFile (from Delivery metadata or UPGRADE.*).
Get-ModuleDocumentation [-All] [-Changelog] [-DefaultCodeLanguage <Auto|PowerShell|Json>] [-File <String>] [-Intro] [-JsonRenderer <Auto|Spectre|System>] [-License] [-Links] [-List] [-ModuleBase <String>] [-Online] [-PreferInternals] [-Raw] [-Readme] [-RepositoryBranch <String>] [-RepositoryPaths <String[]>] [-RepositoryToken <String>] [-Type <Default>] [-Upgrade] [<CommonParameters>]
#
Parameter set: ByBase

Parameters

All SwitchParameter optionalposition: namedpipeline: False
Convenience switch to show Intro, README, CHANGELOG and LICENSE in order.
Changelog SwitchParameter optionalposition: namedpipeline: False
Show CHANGELOG.*.
DefaultCodeLanguage String optionalposition: namedpipeline: Falsevalues: 3
Default language for unlabeled code fences (Auto, PowerShell, Json, None).
Possible values: Auto, PowerShell, Json
File String optionalposition: namedpipeline: False
Show a specific file by name (relative to module root or Internals) or full path.
Intro SwitchParameter optionalposition: namedpipeline: False
Show configured IntroText/IntroFile (from Delivery metadata).
JsonRenderer String optionalposition: namedpipeline: Falsevalues: 3
Select JSON renderer for fenced JSON blocks: Auto, Spectre, or System.
Possible values: Auto, Spectre, System
License SwitchParameter optionalposition: namedpipeline: False
Show LICENSE.*.
Links SwitchParameter optionalposition: namedpipeline: False
Show configured ImportantLinks from Delivery metadata.
List SwitchParameter optionalposition: namedpipeline: False
List discovered documentation files (without rendering).
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 for remote documentation fallback and repository path enumeration.
PreferInternals SwitchParameter optionalposition: namedpipeline: False
Prefer Internals folder over module root when both contain the same file kind.
Raw SwitchParameter optionalposition: namedpipeline: False
Print raw file content without Markdown rendering.
Readme SwitchParameter optionalposition: namedpipeline: False
Show README.*.
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. Env fallbacks: PG_GITHUB_TOKEN/GITHUB_TOKEN or PG_AZDO_PAT/AZURE_DEVOPS_EXT_PAT.
Type DocumentationSelection optionalposition: namedpipeline: Falsevalues: 8
High-level selection of which documents to show. Overrides granular switches when specified.
Possible values: Default, Intro, Readme, Changelog, License, Upgrade, All, Links
Upgrade SwitchParameter optionalposition: namedpipeline: False
Show configured UpgradeText/UpgradeFile (from Delivery metadata or UPGRADE.*).