# Install-ModuleDocumentation

Copies a module's bundled documentation (Internals, README/CHANGELOG/LICENSE) to a chosen location.

Project

PSPublishModule

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

[View on GitHub](https://github.com/EvotecIT/PSPublishModule) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSPublishModule/releases/tag/v3.0.124) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSPublishModule/2.0.27)

Stars **48**

Forks **15**

Open issues **1**

PowerShell Gallery downloads **17,213**

Release **v3.0.195**

Language: C# Updated: 2026-11-25

Command 

**Module**

`PSPublishModule`

**Inputs**

`System.Management.Automation.PSModuleInfo` `System.String`

**Outputs**

`System.String`

Copies a module's bundled documentation (Internals, README/CHANGELOG/LICENSE) to a chosen location.

## 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>]
```

[#](#method-install-moduledocumentation-switchparameter-switchparameter-documentationlayout-switchparameter-string-switchparameter-onexistsoption-switchparameter-string-version)

Parameter set: `ByName`

```
Install-ModuleDocumentation
[-CreateVersionSubfolder]
[-Force]
[-Layout <Direct|Module|ModuleAndVersion>]
[-ListOnly]
[-Module <PSModuleInfo>]
[-NoIntro]
[-OnExists <Merge|Overwrite|Skip|Stop|Refresh>]
[-Open]
-Path <String>
[-RequiredVersion <Version>]
[<CommonParameters>]
```

[#](#method-install-moduledocumentation-switchparameter-switchparameter-documentationlayout-switchparameter-psmoduleinfo-switchparameter-onexistsoption-switchparameter-string-version)

Parameter set: `ByModule`

## Description

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

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

```powershell
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)

```powershell
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)

```powershell
Install-ModuleDocumentation -Name EFAdminManager -Path C:\\Docs -Layout Direct
```

Copies Internals content straight into C:\\Docs.

### Overwrite or force merge behavior

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

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

```powershell
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.

## Parameters

**-CreateVersionSubfolder SwitchParameter optional**

Legacy toggle equivalent to selecting ModuleAndVersion when set; Direct when not set.

**-Force SwitchParameter optional**

Allow replacement of existing files during merge, and clear read-only attributes when overwrite needs to delete an existing destination.

**-Layout DocumentationLayout optional**

Output folder structure strategy. The default, ModuleAndVersion, keeps each module version in its own subfolder.

Possible values: `Direct`, `Module`, `ModuleAndVersion`

**-ListOnly SwitchParameter optional**

Plan only; output the resolved destination path without copying files or changing the destination.

**-Name String optionalposition: 0pipeline: True (ByValue, ByPropertyName)aliases: ModuleNamesets: ByName**

Module name to install documentation for.

**-NoIntro SwitchParameter optional**

Suppress delivery IntroText or IntroFile output during installation.

**-OnExists OnExistsOption optional**

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

Open the resulting folder or README after installation.

**-Path String required**

Base destination folder where documentation will be written. The final folder also depends on Layout.

**-RequiredVersion Version optional**

Exact version to select when multiple module versions are installed.

**-Module PSModuleInfo optionalpipeline: True (ByValue)aliases: InputObject, ModuleInfosets: ByModule**

Module object to install documentation for. Alternative to -Name.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:C5CDB13E9F8443945D3045B3160F47DD936C85050BEFAE5904034CB63B8D99C6 -->
