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

Get-ModuleDocumentation

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

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

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 <DocumentationSelection>]
[-Upgrade]
[<CommonParameters>]
#
Parameter set: ByName
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 <DocumentationSelection>]
[-Upgrade]
[<CommonParameters>]
#
Parameter set: ByModule
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 <DocumentationSelection>]
[-Upgrade]
[<CommonParameters>]
#
Parameter set: ByPath
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 <DocumentationSelection>]
[-Upgrade]
[<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, it will backfill from the module's repository specified by PrivateData.PSData.ProjectUri (GitHub or Azure DevOps), using a token when necessary.

Examples

Example 1

Get-ModuleDocumentation -DocsPath 'C:\Path'

Parameters

-All SwitchParameter optional
Convenience switch to show Intro, README, CHANGELOG and LICENSE in order.
-Changelog SwitchParameter optional
Show CHANGELOG.*.
-DefaultCodeLanguage String optional
Default language for unlabeled code fences (Auto, PowerShell, Json, None).
Possible values: Auto, PowerShell, Json
-File String optional
Show a specific file by name (relative to module root or Internals) or full path.
-Intro SwitchParameter optional
Show configured IntroText/IntroFile (from Delivery metadata).
-JsonRenderer String optional
Select JSON renderer for fenced JSON blocks: Auto, Spectre, or System.
Possible values: Auto, Spectre, System
-License SwitchParameter optional
Show LICENSE.*.
Show configured ImportantLinks from Delivery metadata.
-List SwitchParameter optional
List discovered documentation files (without rendering).
-Name String optionalposition: 0pipeline: True (ByValue, ByPropertyName)aliases: ModuleNamesets: ByName
Module name to display documentation for.
-Online SwitchParameter optional
Enable repository access for remote documentation fallback and repository path enumeration.
-PreferInternals SwitchParameter optional
Prefer Internals folder over module root when both contain the same file kind.
-Raw SwitchParameter optional
Print raw file content without Markdown rendering.
-Readme SwitchParameter optional
Show README.*.
-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. Env fallbacks: PG_GITHUB_TOKEN/GITHUB_TOKEN or PG_AZDO_PAT/AZURE_DEVOPS_EXT_PAT.
-RequiredVersion Version optionalsets: ByName, ByModule
Exact version to select when multiple module versions are installed.
-Type DocumentationSelection optional
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 optional
Show configured UpgradeText/UpgradeFile (from Delivery metadata or UPGRADE.*).
-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.