Install-ManagedModule
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>]#NameParameterSetInstall-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>]#InputObjectParameterSetInstall-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>]#RequiredResourceParameterSetInstall-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>]#RequiredResourceFileParameterSetDescription
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.ToolsInstall 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:\ModulesInstall the exact typed result returned by Find-ManagedModule
Find-ManagedModule -Name Company.Tools -Version 1.2.0 -ProfileName CompanyModules | Install-ManagedModule -Scope CurrentUserParameters
- -AcceptLicense SwitchParameter
- Accept package licenses when packages declare license acceptance is required.
- -AllowClobber SwitchParameter
- Allow command exports to overlap with other modules in the target root.
- Allowed package author values from package metadata.
- -AuthenticodeCheck SwitchParameter
- Validate Authenticode signatures for signable package files before promotion.
- -Credential PSCredential
- Optional repository credential.
- -CredentialSecret String
- Optional repository credential secret.
- -CredentialSecretFilePath String
- Optional path to a file containing the repository credential secret.
- -CredentialUserName String
- Optional repository credential username.
- -DependencyConcurrency Int32
- Maximum number of dependency branches to install concurrently. Omit to use the managed engine default.
- -ExpectedPackageSha256 String
- Expected SHA256 hash of the root package before it is extracted and promoted.
- -Force SwitchParameter
- Reinstall the module version when it already exists.
- -MaximumVersion String
- Maximum package version to install when Version is omitted.
- -MinimumVersion String
- Minimum package version to install when Version is omitted.
- -ModuleRoot String
- Explicit module root. Use with Scope Custom.
- -Name String[]
- Module names to install.
- -NoClobber SwitchParameter
- PSResourceGet-compatible spelling for the managed default that rejects command export conflicts.
- -PackageCacheDirectory String
- Optional package cache directory.
- -Plan SwitchParameter
- Return an inspectable install plan without writing files.
- -Prerelease SwitchParameter
- Include prerelease versions when resolving the latest version.
- -ProfileName String
- Saved repository profile name.
- -Proxy Uri
- Optional HTTP proxy used for repository requests.
- -ProxyCredential PSCredential
- Optional proxy credential used with Proxy.
- -Quiet SwitchParameter
- Suppress optional host summaries and progress-style output without changing pipeline result objects.
- -Reinstall SwitchParameter
- PSResourceGet-compatible spelling for reinstalling the selected module version when it already exists.
- -Repository String
- Repository URL, NuGet v3 service index, flat-container URL, or local folder feed.
- -RepositoryName String
- Friendly repository name used in output.
- -RequireTrustedRepository SwitchParameter
- Require the selected repository profile to be marked trusted.
- -Scope ManagedModuleInstallScope
- Install scope used when ModuleRoot is not supplied.
- Possible values:
CurrentUser,AllUsers,Custom - -ShellEdition ManagedModuleShellEdition
- PowerShell path family used when resolving default CurrentUser or AllUsers module roots.
- Possible values:
Auto,Desktop,Core - -ShowSummary SwitchParameter
- Write a compact Spectre.Console summary for each plan or result.
- -SkipDependencyCheck SwitchParameter
- Skip installing dependencies declared by the package.
- -TrustPolicy ManagedModuleTrustPolicy
- Optional typed repository/package trust policy.
- -Version String
- Exact package version to install. When omitted, the latest repository version is used.
- -VersionPolicy String
- NuGet-style version range policy used when Version is omitted.
- -InputObject ManagedModuleVersionInfo[]
- Module versions returned by Find-ManagedModule to install.
- -RequiredResource Object
- PSResourceGet-style required resource map to install.
- -RequiredResourceFile String
- 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.