API Reference
Update-ManagedModule
Updates installed PowerShell modules through the managed C# module engine.
Remarks
This command provides the module-update functionality of Update-PSResource. It inspects the selected module root and updates only when the repository contains a newer selected version, or installs a named target when the selected scope has no copy. When Name is omitted, all installed modules in the selected roots are considered. Hash-constrained pipeline input is buffered and validated as one package target before any update starts.
Examples
Update a module in the current user's module path
Update-ManagedModule -Name Company.Tools
Update a module in an explicit module root from a local feed
Update-ManagedModule -Name Company.Tools -Repository C:\Packages -Path C:\Modules
Preview updates for every module in the current-user root
Update-ManagedModule -Scope CurrentUser -Plan
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
Update-ManagedModule [-AcceptLicense] [-AllowClobber] [-AllowedAuthor <String[]>] [-AllowLoadedModuleUpdate] [-AuthenticodeCheck] [-Credential <PSCredential>] [-CredentialSecret <String>] [-CredentialSecretFilePath <String>] [-CredentialUserName <String>] [-DependencyConcurrency <Int32>] [-ExpectedPackageSha256 <String>] [-FamilyModuleName <String[]>] [-FamilyModuleNamePrefix <String>] [-FamilyName <String>] [-FamilyPolicy <ManagedModuleFamilyPolicy>] [-Force] [-LoadedModule <ManagedModuleLoadedModule[]>] [-MaximumVersion <String>] [-MinimumVersion <String>] [-ModuleRoot <String>] [-Name <String[]>] [-PackageCacheDirectory <String>] [-Plan] [-Prerelease] [-ProfileName <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Quiet] [-Repository <String>] [-RepositoryName <String>] [-RequireSourceMatch] [-RequireTrustedRepository] [-Scope <CurrentUser|AllUsers|Custom>] [-ShellEdition <Auto|Desktop|Core>] [-ShowSummary] [-SkipDependencyCheck] [-SourcePolicy <ManagedModuleSourcePolicy>] [-TrustPolicy <ManagedModuleTrustPolicy>] [-Version <String>] [-VersionPolicy <String>] [<CommonParameters>]#All Parameter SetsParameters
- 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.
- AllowedAuthor String[]
- Allowed package author values from package metadata.
- AllowLoadedModuleUpdate SwitchParameter
- Allow updating even when a matching module is loaded in the current session or supplied as evidence.
- 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 during update delivery. Omit to use the managed engine default.
- ExpectedPackageSha256 String
- Expected SHA256 hash of the requested module package before it is extracted and promoted.
- FamilyModuleName String[]
- Exact installed module names that belong to the family.
- FamilyModuleNamePrefix String
- Module name prefix used to discover installed family members.
- FamilyName String
- Friendly family policy name used in plans and diagnostics.
- FamilyPolicy ManagedModuleFamilyPolicy
- Typed family policy used to keep related installed modules version-coherent.
- Force SwitchParameter
- Reinstall the target version when it is already installed.
- LoadedModule ManagedModuleLoadedModule[]
- Additional loaded module evidence used with modules detected automatically in the current PowerShell session.
- MaximumVersion String
- Maximum target version when Version is omitted.
- MinimumVersion String
- Minimum target version when Version is omitted.
- ModuleRoot String
- Explicit module root. When supplied, the command updates that root.
- Name String[]
- Module names to update.
- PackageCacheDirectory String
- Optional package cache directory.
- Plan SwitchParameter
- Return an inspectable update 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.
- Repository String
- Repository URL, NuGet v3 service index, flat-container URL, or local folder feed.
- RepositoryName String
- Friendly repository name used in output.
- RequireSourceMatch SwitchParameter
- Require installed source evidence to match the requested repository before reporting up to date.
- RequireTrustedRepository SwitchParameter
- Require the selected repository profile to be marked trusted.
- Scope ManagedModuleInstallScope
- Scope to inspect and update 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.
- SourcePolicy ManagedModuleSourcePolicy
- Typed source policy used to require managed receipt evidence from the requested repository.
- TrustPolicy ManagedModuleTrustPolicy
- Optional typed repository/package trust policy.
- Version String
- Exact target version. When omitted, the latest repository version is used.
- VersionPolicy String
- NuGet-style version range policy used when Version is omitted.
Outputs
PowerForge.ManagedModuleUpdateResult, PowerForge.ManagedModuleUpdatePlan