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-ManagedModule

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

Installs PowerShell modules through the managed C# module engine.

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

Description

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

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

Parameters

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

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.