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

Update-ManagedModule

Namespace PSPublishModule
Inputs
System.String[]
Outputs
PowerForge.ManagedModuleUpdateResult PowerForge.ManagedModuleUpdatePlan

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

Authored help example

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>]
#
Parameter set: All Parameter Sets

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.
AllowLoadedModuleUpdate SwitchParameter optionalposition: namedpipeline: False
Allow updating even when a matching module is loaded in the current session or supplied as evidence.
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 during update delivery. Omit to use the managed engine default.
ExpectedPackageSha256 String optionalposition: namedpipeline: Falsealiases: PackageSha256, Sha256
Expected SHA256 hash of the requested module package before it is extracted and promoted.
FamilyModuleName String[] optionalposition: namedpipeline: False
Exact installed module names that belong to the family.
FamilyModuleNamePrefix String optionalposition: namedpipeline: False
Module name prefix used to discover installed family members.
FamilyName String optionalposition: namedpipeline: False
Friendly family policy name used in plans and diagnostics.
FamilyPolicy ManagedModuleFamilyPolicy optionalposition: namedpipeline: False
Typed family policy used to keep related installed modules version-coherent.
Force SwitchParameter optionalposition: namedpipeline: False
Reinstall the target version when it is already installed.
LoadedModule ManagedModuleLoadedModule[] optionalposition: namedpipeline: False
Additional loaded module evidence used with modules detected automatically in the current PowerShell session.
MaximumVersion String optionalposition: namedpipeline: False
Maximum target version when Version is omitted.
MinimumVersion String optionalposition: namedpipeline: False
Minimum target version when Version is omitted.
ModuleRoot String optionalposition: namedpipeline: Falsealiases: Path
Explicit module root. When supplied, the command updates that root.
Name String[] optionalposition: 0pipeline: True (ByValue, ByPropertyName)aliases: ModuleName
Module names to update.
PackageCacheDirectory String optionalposition: namedpipeline: False
Optional package cache directory.
Plan SwitchParameter optionalposition: namedpipeline: False
Return an inspectable update 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.
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.
RequireSourceMatch SwitchParameter optionalposition: namedpipeline: False
Require installed source evidence to match the requested repository before reporting up to date.
RequireTrustedRepository SwitchParameter optionalposition: namedpipeline: False
Require the selected repository profile to be marked trusted.
Scope ManagedModuleInstallScope optionalposition: namedpipeline: Falsevalues: 3
Scope to inspect and update 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.
SourcePolicy ManagedModuleSourcePolicy optionalposition: namedpipeline: False
Typed source policy used to require managed receipt evidence from the requested repository.
TrustPolicy ManagedModuleTrustPolicy optionalposition: namedpipeline: False
Optional typed repository/package trust policy.
Version String optionalposition: namedpipeline: Falsealiases: RequiredVersion
Exact target version. 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.ManagedModuleUpdateResult, PowerForge.ManagedModuleUpdatePlan