API Reference
Install-ModuleDocumentation
Copies a module's bundled documentation (Internals, README/CHANGELOG/LICENSE) to a chosen location.
Remarks
Copies a module's bundled documentation (Internals, README/CHANGELOG/LICENSE) to a chosen location. Resolves the module and copies its documentation payload into a destination folder arranged by DocumentationLayout. The payload is the module's delivery Internals folder (or the default Internals folder) plus selected root documentation files such as README, CHANGELOG and LICENSE. Repeat runs can merge, refresh, overwrite, skip or stop based on OnExistsOption. The default Merge mode adds missing files and keeps existing files unless -Force is used. The Refresh mode overwrites package files while keeping local files that are not part of the package. When successful, returns the destination path.
Examples
Install into Module\Version folder
PS>
Install-ModuleDocumentation -Name EFAdminManager -Path C:\\Docs -Layout ModuleAndVersion
Copies Internals and selected root files into C:\\Docs\\EFAdminManager\\<Version>.
Pipe a specific module and open the result
PS>
Get-Module -ListAvailable EFAdminManager | Install-ModuleDocumentation -Path C:\\Docs -OnExists Merge -Open
Merges content into an existing destination, preserves existing files, and opens the README (if present) afterwards.
Install into Module folder (no Version segment)
PS>
Install-ModuleDocumentation -Name EFAdminManager -Path C:\\Docs -Layout Module
Targets C:\\Docs\\EFAdminManager. Use -OnExists Merge to keep existing files.
Install directly into a folder (no Module/Version)
PS>
Install-ModuleDocumentation -Name EFAdminManager -Path C:\\Docs -Layout Direct
Copies Internals content straight into C:\\Docs.
Overwrite or force merge behavior
PS>
Install-ModuleDocumentation -Name EFAdminManager -Path C:\\Docs -OnExists Overwrite
Removes the destination before copying. Alternatively, use -OnExists Merge -Force to overwrite individual files.
Preview the destination without changing files
PS>
Install-ModuleDocumentation -Name EFAdminManager -Path C:\\Docs -Layout ModuleAndVersion -ListOnly
Shows the folder that would be used for the selected module/version without copying bundled documentation.
Typical build-time configuration for Internals and ordering
PS>
New-ConfigurationInformation -IncludeAll 'Internals\\' ; New-ConfigurationDelivery -Enable -InternalsPath 'Internals' -DocumentationOrder '01-Intro.md','02-HowTo.md'
Bundles Internals and controls the display order of Docs in viewers.
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
Install-ModuleDocumentation [-CreateVersionSubfolder] [-Force] [-Layout <Direct|Module|ModuleAndVersion>] [-ListOnly] [-Name <String>] [-NoIntro] [-OnExists <Merge|Overwrite|Skip|Stop|Refresh>] [-Open] -Path <String> [-RequiredVersion <Version>] [<CommonParameters>]#ByNameParameters
- CreateVersionSubfolder SwitchParameter
- Legacy toggle equivalent to selecting ModuleAndVersion when set; Direct when not set.
- Force SwitchParameter
- Allow replacement of existing files during merge, and clear read-only attributes when overwrite needs to delete an existing destination.
- Layout DocumentationLayout
- Output folder structure strategy. The default, ModuleAndVersion, keeps each module version in its own subfolder.
- Possible values:
Direct,Module,ModuleAndVersion - ListOnly SwitchParameter
- Plan only; output the resolved destination path without copying files or changing the destination.
- Name String
- Module name to install documentation for.
- NoIntro SwitchParameter
- Suppress delivery IntroText or IntroFile output during installation.
- OnExists OnExistsOption
- Behavior when the destination folder already exists. The default, Merge, adds missing files and preserves existing files unless -Force is used. Refresh overwrites package files without deleting unrelated local files.
- Possible values:
Merge,Overwrite,Skip,Stop,Refresh - Open SwitchParameter
- Open the resulting folder or README after installation.
- Path String
- Base destination folder where documentation will be written. The final folder also depends on Layout.
- RequiredVersion Version
- Exact version to select when multiple module versions are installed.
Outputs
System.String
Install-ModuleDocumentation [-CreateVersionSubfolder] [-Force] [-Layout <Direct|Module|ModuleAndVersion>] [-ListOnly] [-Module <PSModuleInfo>] [-NoIntro] [-OnExists <Merge|Overwrite|Skip|Stop|Refresh>] [-Open] -Path <String> [-RequiredVersion <Version>] [<CommonParameters>]#ByModuleParameters
- CreateVersionSubfolder SwitchParameter
- Legacy toggle equivalent to selecting ModuleAndVersion when set; Direct when not set.
- Force SwitchParameter
- Allow replacement of existing files during merge, and clear read-only attributes when overwrite needs to delete an existing destination.
- Layout DocumentationLayout
- Output folder structure strategy. The default, ModuleAndVersion, keeps each module version in its own subfolder.
- Possible values:
Direct,Module,ModuleAndVersion - ListOnly SwitchParameter
- Plan only; output the resolved destination path without copying files or changing the destination.
- Module PSModuleInfo
- Module object to install documentation for. Alternative to -Name.
- NoIntro SwitchParameter
- Suppress delivery IntroText or IntroFile output during installation.
- OnExists OnExistsOption
- Behavior when the destination folder already exists. The default, Merge, adds missing files and preserves existing files unless -Force is used. Refresh overwrites package files without deleting unrelated local files.
- Possible values:
Merge,Overwrite,Skip,Stop,Refresh - Open SwitchParameter
- Open the resulting folder or README after installation.
- Path String
- Base destination folder where documentation will be written. The final folder also depends on Layout.
- RequiredVersion Version
- Exact version to select when multiple module versions are installed.
Outputs
System.String