# Install-ModuleDependency

Installs a module and its embedded dependencies to an explicit private runtime folder.

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.PSObject` `System.String`

**Outputs**

`PowerForge.EmbeddedModuleDependencyInstallResult`

Installs a module and its embedded dependencies to an explicit private runtime folder.

## Syntax

```
Install-ModuleDependency
[-DependencyName <String[]>]
[-Force]
[-ListOnly]
[-Name] <String>
[-OnExists <Merge|Overwrite|Skip|Stop|Refresh>]
[-Path] <String>
[-RequiredVersion <Version>]
[<CommonParameters>]
```

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

Parameter set: `ByName`

```
Install-ModuleDependency
[-DependencyName <String[]>]
[-Force]
[-ListOnly]
-Module <PSObject>
[-OnExists <Merge|Overwrite|Skip|Stop|Refresh>]
[-Path] <String>
[-RequiredVersion <Version>]
[<CommonParameters>]
```

[#](#method-install-moduledependency-string-switchparameter-switchparameter-psobject-onexistsoption-string-version)

Parameter set: `ByModule`

## Description

The command reads the dependency manifest produced by New-ConfigurationModule -Type EmbeddedModule and copies the root module plus each dependency payload to the requested path. Modules are not installed into PSModulePath unless the chosen path is already part of PSModulePath.

## Examples

### Install a module and all embedded dependencies to a private runtime folder

```powershell
Install-ModuleDependency -Name EntraIDConfig -Path C:\PrivateDeps
```

### Install only selected dependencies

```powershell
Install-ModuleDependency -Name EntraIDConfig -DependencyName Microsoft.Graph.Authentication -Path C:\PrivateDeps -Force
```

## Parameters

**-DependencyName String[] optional**

Dependency names to install. When omitted, installs all embedded dependencies.

**-Force SwitchParameter optional**

Overwrite existing dependency folders when merge or overwrite behavior requires it.

**-ListOnly SwitchParameter optional**

Preview planned dependency copies without writing files.

**-Name String requiredposition: 0pipeline: True (ByPropertyName)aliases: ModuleNamesets: ByName**

Module containing embedded dependencies.

**-OnExists OnExistsOption optional**

Conflict handling when a dependency version folder already exists.

Possible values: `Merge`, `Overwrite`, `Skip`, `Stop`, `Refresh`

**-Path String requiredposition: 1**

Destination folder. The root module and dependencies are copied under Name\Version folders.

**-RequiredVersion Version optional**

Optional exact source module version.

**-Module PSObject requiredpipeline: True (ByValue)sets: ByModule**

Specific module object containing embedded dependencies.

## 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:2564F28465036EF619B80A6C4046ADF5309355F597DC45EAC45E5EAF29E134AD -->
