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.169
Language: C# Updated: 2026-10-13

API Reference

Command

Install-ManagedModule

Namespace PSPublishModule
Inputs
PowerForge.ManagedModuleVersionInfo[] System.String[]
Outputs
PowerForge.ManagedModuleInstallResult PowerForge.ManagedModuleInstallPlan

Installs PowerShell modules through the managed C# module engine.

Remarks

This command provides the module-install functionality of Install-PSResource through the PowerForge repository, dependency, integrity, and promotion services. It accepts names, required-resource maps, required resource files, and typed output from Find-ManagedModule without invoking PowerShellGet or PSResourceGet. Managed installs always return a typed result or plan. Repository trust is explicit through managed profiles and trust policies instead of a one-invocation prompt-suppression switch.

Examples

Authored help example

Install the latest stable module from the default public gallery endpoint


Install-ManagedModule -Name Company.Tools
        

Install an exact module version from a local feed into an explicit root


Install-ManagedModule -Name Company.Tools -Version 1.2.0 -Repository C:\Packages -Scope Custom -ModuleRoot C:\Modules
        

Install the exact typed result returned by Find-ManagedModule


Find-ManagedModule -Name Company.Tools -Version 1.2.0 -ProfileName CompanyModules | Install-ManagedModule -Scope CurrentUser
        

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-ManagedModule [-AcceptLicense] [-AllowClobber] [-AllowedAuthor <String[]>] [-AuthenticodeCheck] [-Credential <PSCredential>] [-CredentialSecret <String>] [-CredentialSecretFilePath <String>] [-CredentialUserName <String>] [-DependencyConcurrency <Int32>] [-ExpectedPackageSha256 <String>] [-Force] [-MaximumVersion <String>] [-MinimumVersion <String>] [-ModuleRoot <String>] -Name <String[]> [-NoClobber] [-PackageCacheDirectory <String>] [-Plan] [-Prerelease] [-ProfileName <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Quiet] [-Reinstall] [-Repository <String>] [-RepositoryName <String>] [-RequireTrustedRepository] [-Scope <CurrentUser|AllUsers|Custom>] [-ShellEdition <Auto|Desktop|Core>] [-ShowSummary] [-SkipDependencyCheck] [-TrustPolicy <ManagedModuleTrustPolicy>] [-Version <String>] [-VersionPolicy <String>] [<CommonParameters>]
#
Parameter set: NameParameterSet

Parameters

AcceptLicense SwitchParameter optionalposition: namedpipeline: False
Accept package licenses when packages declare license acceptance is required.
AllowClobber SwitchParameter optionalposition: namedpipeline: False
Allow command exports to overlap with other modules in the target root.
AllowedAuthor String[] optionalposition: namedpipeline: Falsealiases: RequiredAuthor, TrustedAuthor
Allowed package author values from package metadata.
AuthenticodeCheck SwitchParameter optionalposition: namedpipeline: False
Validate Authenticode signatures for signable package files before promotion.
Credential PSCredential optionalposition: namedpipeline: False
Optional repository credential.
CredentialSecret String optionalposition: namedpipeline: Falsealiases: Password, Token
Optional repository credential secret.
CredentialSecretFilePath String optionalposition: namedpipeline: Falsealiases: CredentialPath, TokenPath
Optional path to a file containing the repository credential secret.
CredentialUserName String optionalposition: namedpipeline: Falsealiases: UserName
Optional repository credential username.
DependencyConcurrency Int32 optionalposition: namedpipeline: False
Maximum number of dependency branches to install concurrently. Omit to use the managed engine default.
ExpectedPackageSha256 String optionalposition: namedpipeline: Falsealiases: PackageSha256, Sha256
Expected SHA256 hash of the root package before it is extracted and promoted.
Force SwitchParameter optionalposition: namedpipeline: False
Reinstall the module version when it already exists.
MaximumVersion String optionalposition: namedpipeline: False
Maximum package version to install when Version is omitted.
MinimumVersion String optionalposition: namedpipeline: False
Minimum package version to install when Version is omitted.
ModuleRoot String optionalposition: namedpipeline: Falsealiases: Path
Explicit module root. Use with Scope Custom.
Name String[] requiredposition: 0pipeline: True (ByValue, ByPropertyName)aliases: ModuleName
Module names to install.
NoClobber SwitchParameter optionalposition: namedpipeline: False
PSResourceGet-compatible spelling for the managed default that rejects command export conflicts.
PackageCacheDirectory String optionalposition: namedpipeline: False
Optional package cache directory.
Plan SwitchParameter optionalposition: namedpipeline: False
Return an inspectable install plan without writing files.
Prerelease SwitchParameter optionalposition: namedpipeline: Falsealiases: AllowPrerelease
Include prerelease versions when resolving the latest version.
ProfileName String optionalposition: namedpipeline: False
Saved repository profile name.
Proxy Uri optionalposition: namedpipeline: False
Optional HTTP proxy used for repository requests.
ProxyCredential PSCredential optionalposition: namedpipeline: False
Optional proxy credential used with Proxy.
Quiet SwitchParameter optionalposition: namedpipeline: False
Suppress optional host summaries and progress-style output without changing pipeline result objects.
Reinstall SwitchParameter optionalposition: namedpipeline: False
PSResourceGet-compatible spelling for reinstalling the selected module version when it already exists.
Repository String optionalposition: 1pipeline: Falsealiases: RepositoryUri, Source
Repository URL, NuGet v3 service index, flat-container URL, or local folder feed.
RepositoryName String optionalposition: namedpipeline: False
Friendly repository name used in output.
RequireTrustedRepository SwitchParameter optionalposition: namedpipeline: False
Require the selected repository profile to be marked trusted.
Scope ManagedModuleInstallScope optionalposition: namedpipeline: Falsevalues: 3
Install scope used when ModuleRoot is not supplied.
Possible values: CurrentUser, AllUsers, Custom
ShellEdition ManagedModuleShellEdition optionalposition: namedpipeline: Falsevalues: 3
PowerShell path family used when resolving default CurrentUser or AllUsers module roots.
Possible values: Auto, Desktop, Core
ShowSummary SwitchParameter optionalposition: namedpipeline: False
Write a compact Spectre.Console summary for each plan or result.
SkipDependencyCheck SwitchParameter optionalposition: namedpipeline: Falsealiases: SkipDependenciesCheck
Skip installing dependencies declared by the package.
TrustPolicy ManagedModuleTrustPolicy optionalposition: namedpipeline: False
Optional typed repository/package trust policy.
Version String optionalposition: namedpipeline: Falsealiases: RequiredVersion
Exact package version to install. When omitted, the latest repository version is used.
VersionPolicy String optionalposition: namedpipeline: False
NuGet-style version range policy used when Version is omitted.

Outputs

PowerForge.ManagedModuleInstallResult, PowerForge.ManagedModuleInstallPlan

Install-ManagedModule [-AcceptLicense] [-AllowClobber] [-AllowedAuthor <String[]>] [-AuthenticodeCheck] [-Credential <PSCredential>] [-CredentialSecret <String>] [-CredentialSecretFilePath <String>] [-CredentialUserName <String>] [-DependencyConcurrency <Int32>] [-ExpectedPackageSha256 <String>] [-Force] -InputObject <ManagedModuleVersionInfo[]> [-ModuleRoot <String>] [-NoClobber] [-PackageCacheDirectory <String>] [-Plan] [-ProfileName <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Quiet] [-Reinstall] [-Repository <String>] [-RepositoryName <String>] [-RequireTrustedRepository] [-Scope <CurrentUser|AllUsers|Custom>] [-ShellEdition <Auto|Desktop|Core>] [-ShowSummary] [-SkipDependencyCheck] [-TrustPolicy <ManagedModuleTrustPolicy>] [<CommonParameters>]
#
Parameter set: InputObjectParameterSet

Parameters

AcceptLicense SwitchParameter optionalposition: namedpipeline: False
Accept package licenses when packages declare license acceptance is required.
AllowClobber SwitchParameter optionalposition: namedpipeline: False
Allow command exports to overlap with other modules in the target root.
AllowedAuthor String[] optionalposition: namedpipeline: Falsealiases: RequiredAuthor, TrustedAuthor
Allowed package author values from package metadata.
AuthenticodeCheck SwitchParameter optionalposition: namedpipeline: False
Validate Authenticode signatures for signable package files before promotion.
Credential PSCredential optionalposition: namedpipeline: False
Optional repository credential.
CredentialSecret String optionalposition: namedpipeline: Falsealiases: Password, Token
Optional repository credential secret.
CredentialSecretFilePath String optionalposition: namedpipeline: Falsealiases: CredentialPath, TokenPath
Optional path to a file containing the repository credential secret.
CredentialUserName String optionalposition: namedpipeline: Falsealiases: UserName
Optional repository credential username.
DependencyConcurrency Int32 optionalposition: namedpipeline: False
Maximum number of dependency branches to install concurrently. Omit to use the managed engine default.
ExpectedPackageSha256 String optionalposition: namedpipeline: Falsealiases: PackageSha256, Sha256
Expected SHA256 hash of the root package before it is extracted and promoted.
Force SwitchParameter optionalposition: namedpipeline: False
Reinstall the module version when it already exists.
InputObject ManagedModuleVersionInfo[] requiredposition: 0pipeline: True (ByValue, ByPropertyName)aliases: ParentResource
Module versions returned by Find-ManagedModule to install.
ModuleRoot String optionalposition: namedpipeline: Falsealiases: Path
Explicit module root. Use with Scope Custom.
NoClobber SwitchParameter optionalposition: namedpipeline: False
PSResourceGet-compatible spelling for the managed default that rejects command export conflicts.
PackageCacheDirectory String optionalposition: namedpipeline: False
Optional package cache directory.
Plan SwitchParameter optionalposition: namedpipeline: False
Return an inspectable install plan without writing files.
ProfileName String optionalposition: namedpipeline: False
Saved repository profile name.
Proxy Uri optionalposition: namedpipeline: False
Optional HTTP proxy used for repository requests.
ProxyCredential PSCredential optionalposition: namedpipeline: False
Optional proxy credential used with Proxy.
Quiet SwitchParameter optionalposition: namedpipeline: False
Suppress optional host summaries and progress-style output without changing pipeline result objects.
Reinstall SwitchParameter optionalposition: namedpipeline: False
PSResourceGet-compatible spelling for reinstalling the selected module version when it already exists.
Repository String optionalposition: 1pipeline: Falsealiases: RepositoryUri, Source
Repository URL, NuGet v3 service index, flat-container URL, or local folder feed.
RepositoryName String optionalposition: namedpipeline: False
Friendly repository name used in output.
RequireTrustedRepository SwitchParameter optionalposition: namedpipeline: False
Require the selected repository profile to be marked trusted.
Scope ManagedModuleInstallScope optionalposition: namedpipeline: Falsevalues: 3
Install scope used when ModuleRoot is not supplied.
Possible values: CurrentUser, AllUsers, Custom
ShellEdition ManagedModuleShellEdition optionalposition: namedpipeline: Falsevalues: 3
PowerShell path family used when resolving default CurrentUser or AllUsers module roots.
Possible values: Auto, Desktop, Core
ShowSummary SwitchParameter optionalposition: namedpipeline: False
Write a compact Spectre.Console summary for each plan or result.
SkipDependencyCheck SwitchParameter optionalposition: namedpipeline: Falsealiases: SkipDependenciesCheck
Skip installing dependencies declared by the package.
TrustPolicy ManagedModuleTrustPolicy optionalposition: namedpipeline: False
Optional typed repository/package trust policy.

Outputs

PowerForge.ManagedModuleInstallResult, PowerForge.ManagedModuleInstallPlan

Install-ManagedModule [-AcceptLicense] [-AllowClobber] [-AllowedAuthor <String[]>] [-AuthenticodeCheck] [-Credential <PSCredential>] [-CredentialSecret <String>] [-CredentialSecretFilePath <String>] [-CredentialUserName <String>] [-DependencyConcurrency <Int32>] [-ExpectedPackageSha256 <String>] [-Force] [-ModuleRoot <String>] [-NoClobber] [-PackageCacheDirectory <String>] [-Plan] [-ProfileName <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Quiet] [-Reinstall] [-RepositoryName <String>] -RequiredResource <Object> [-RequireTrustedRepository] [-Scope <CurrentUser|AllUsers|Custom>] [-ShellEdition <Auto|Desktop|Core>] [-ShowSummary] [-SkipDependencyCheck] [-TrustPolicy <ManagedModuleTrustPolicy>] [<CommonParameters>]
#
Parameter set: RequiredResourceParameterSet

Parameters

AcceptLicense SwitchParameter optionalposition: namedpipeline: False
Accept package licenses when packages declare license acceptance is required.
AllowClobber SwitchParameter optionalposition: namedpipeline: False
Allow command exports to overlap with other modules in the target root.
AllowedAuthor String[] optionalposition: namedpipeline: Falsealiases: RequiredAuthor, TrustedAuthor
Allowed package author values from package metadata.
AuthenticodeCheck SwitchParameter optionalposition: namedpipeline: False
Validate Authenticode signatures for signable package files before promotion.
Credential PSCredential optionalposition: namedpipeline: False
Optional repository credential.
CredentialSecret String optionalposition: namedpipeline: Falsealiases: Password, Token
Optional repository credential secret.
CredentialSecretFilePath String optionalposition: namedpipeline: Falsealiases: CredentialPath, TokenPath
Optional path to a file containing the repository credential secret.
CredentialUserName String optionalposition: namedpipeline: Falsealiases: UserName
Optional repository credential username.
DependencyConcurrency Int32 optionalposition: namedpipeline: False
Maximum number of dependency branches to install concurrently. Omit to use the managed engine default.
ExpectedPackageSha256 String optionalposition: namedpipeline: Falsealiases: PackageSha256, Sha256
Expected SHA256 hash of the root package before it is extracted and promoted.
Force SwitchParameter optionalposition: namedpipeline: False
Reinstall the module version when it already exists.
ModuleRoot String optionalposition: namedpipeline: Falsealiases: Path
Explicit module root. Use with Scope Custom.
NoClobber SwitchParameter optionalposition: namedpipeline: False
PSResourceGet-compatible spelling for the managed default that rejects command export conflicts.
PackageCacheDirectory String optionalposition: namedpipeline: False
Optional package cache directory.
Plan SwitchParameter optionalposition: namedpipeline: False
Return an inspectable install plan without writing files.
ProfileName String optionalposition: namedpipeline: False
Saved repository profile name.
Proxy Uri optionalposition: namedpipeline: False
Optional HTTP proxy used for repository requests.
ProxyCredential PSCredential optionalposition: namedpipeline: False
Optional proxy credential used with Proxy.
Quiet SwitchParameter optionalposition: namedpipeline: False
Suppress optional host summaries and progress-style output without changing pipeline result objects.
Reinstall SwitchParameter optionalposition: namedpipeline: False
PSResourceGet-compatible spelling for reinstalling the selected module version when it already exists.
RepositoryName String optionalposition: namedpipeline: False
Friendly repository name used in output.
RequiredResource Object requiredposition: namedpipeline: False
PSResourceGet-style required resource map to install.
RequireTrustedRepository SwitchParameter optionalposition: namedpipeline: False
Require the selected repository profile to be marked trusted.
Scope ManagedModuleInstallScope optionalposition: namedpipeline: Falsevalues: 3
Install scope used when ModuleRoot is not supplied.
Possible values: CurrentUser, AllUsers, Custom
ShellEdition ManagedModuleShellEdition optionalposition: namedpipeline: Falsevalues: 3
PowerShell path family used when resolving default CurrentUser or AllUsers module roots.
Possible values: Auto, Desktop, Core
ShowSummary SwitchParameter optionalposition: namedpipeline: False
Write a compact Spectre.Console summary for each plan or result.
SkipDependencyCheck SwitchParameter optionalposition: namedpipeline: Falsealiases: SkipDependenciesCheck
Skip installing dependencies declared by the package.
TrustPolicy ManagedModuleTrustPolicy optionalposition: namedpipeline: False
Optional typed repository/package trust policy.

Outputs

PowerForge.ManagedModuleInstallResult, PowerForge.ManagedModuleInstallPlan

Install-ManagedModule [-AcceptLicense] [-AllowClobber] [-AllowedAuthor <String[]>] [-AuthenticodeCheck] [-Credential <PSCredential>] [-CredentialSecret <String>] [-CredentialSecretFilePath <String>] [-CredentialUserName <String>] [-DependencyConcurrency <Int32>] [-ExpectedPackageSha256 <String>] [-Force] [-ModuleRoot <String>] [-NoClobber] [-PackageCacheDirectory <String>] [-Plan] [-ProfileName <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Quiet] [-Reinstall] [-RepositoryName <String>] -RequiredResourceFile <String> [-RequireTrustedRepository] [-Scope <CurrentUser|AllUsers|Custom>] [-ShellEdition <Auto|Desktop|Core>] [-ShowSummary] [-SkipDependencyCheck] [-TrustPolicy <ManagedModuleTrustPolicy>] [<CommonParameters>]
#
Parameter set: RequiredResourceFileParameterSet

Parameters

AcceptLicense SwitchParameter optionalposition: namedpipeline: False
Accept package licenses when packages declare license acceptance is required.
AllowClobber SwitchParameter optionalposition: namedpipeline: False
Allow command exports to overlap with other modules in the target root.
AllowedAuthor String[] optionalposition: namedpipeline: Falsealiases: RequiredAuthor, TrustedAuthor
Allowed package author values from package metadata.
AuthenticodeCheck SwitchParameter optionalposition: namedpipeline: False
Validate Authenticode signatures for signable package files before promotion.
Credential PSCredential optionalposition: namedpipeline: False
Optional repository credential.
CredentialSecret String optionalposition: namedpipeline: Falsealiases: Password, Token
Optional repository credential secret.
CredentialSecretFilePath String optionalposition: namedpipeline: Falsealiases: CredentialPath, TokenPath
Optional path to a file containing the repository credential secret.
CredentialUserName String optionalposition: namedpipeline: Falsealiases: UserName
Optional repository credential username.
DependencyConcurrency Int32 optionalposition: namedpipeline: False
Maximum number of dependency branches to install concurrently. Omit to use the managed engine default.
ExpectedPackageSha256 String optionalposition: namedpipeline: Falsealiases: PackageSha256, Sha256
Expected SHA256 hash of the root package before it is extracted and promoted.
Force SwitchParameter optionalposition: namedpipeline: False
Reinstall the module version when it already exists.
ModuleRoot String optionalposition: namedpipeline: Falsealiases: Path
Explicit module root. Use with Scope Custom.
NoClobber SwitchParameter optionalposition: namedpipeline: False
PSResourceGet-compatible spelling for the managed default that rejects command export conflicts.
PackageCacheDirectory String optionalposition: namedpipeline: False
Optional package cache directory.
Plan SwitchParameter optionalposition: namedpipeline: False
Return an inspectable install plan without writing files.
ProfileName String optionalposition: namedpipeline: False
Saved repository profile name.
Proxy Uri optionalposition: namedpipeline: False
Optional HTTP proxy used for repository requests.
ProxyCredential PSCredential optionalposition: namedpipeline: False
Optional proxy credential used with Proxy.
Quiet SwitchParameter optionalposition: namedpipeline: False
Suppress optional host summaries and progress-style output without changing pipeline result objects.
Reinstall SwitchParameter optionalposition: namedpipeline: False
PSResourceGet-compatible spelling for reinstalling the selected module version when it already exists.
RepositoryName String optionalposition: namedpipeline: False
Friendly repository name used in output.
RequiredResourceFile String requiredposition: namedpipeline: False
Path to a PowerShell data file containing a PSResourceGet-style required resource map.
RequireTrustedRepository SwitchParameter optionalposition: namedpipeline: False
Require the selected repository profile to be marked trusted.
Scope ManagedModuleInstallScope optionalposition: namedpipeline: Falsevalues: 3
Install scope used when ModuleRoot is not supplied.
Possible values: CurrentUser, AllUsers, Custom
ShellEdition ManagedModuleShellEdition optionalposition: namedpipeline: Falsevalues: 3
PowerShell path family used when resolving default CurrentUser or AllUsers module roots.
Possible values: Auto, Desktop, Core
ShowSummary SwitchParameter optionalposition: namedpipeline: False
Write a compact Spectre.Console summary for each plan or result.
SkipDependencyCheck SwitchParameter optionalposition: namedpipeline: Falsealiases: SkipDependenciesCheck
Skip installing dependencies declared by the package.
TrustPolicy ManagedModuleTrustPolicy optionalposition: namedpipeline: False
Optional typed repository/package trust policy.

Outputs

PowerForge.ManagedModuleInstallResult, PowerForge.ManagedModuleInstallPlan