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

Install-ModuleDependency

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>]
#
Parameter set: ByName
Install-ModuleDependency
[-DependencyName <String[]>]
[-Force]
[-ListOnly]
-Module <PSObject>
[-OnExists <Merge|Overwrite|Skip|Stop|Refresh>]
[-Path] <String>
[-RequiredVersion <Version>]
[<CommonParameters>]
#
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

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

Install only selected dependencies

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.