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

Set-ManagedModuleCatalog

Namespace PSPublishModule
Inputs
None
Outputs
PowerForge.ManagedModuleCatalog

Creates or updates local managed module catalog cache settings.

Remarks

The catalog stores local repository metadata only. It does not mirror package blobs unless a later package cache feature is explicitly enabled. Managed module commands can use this metadata as an opt-in fallback when live repository metadata is unavailable.

Examples

Authored help example

Enable a fallback catalog for PowerShell Gallery metadata


Set-ManagedModuleCatalog -Name PSGallery -Mode Fallback -MaxStaleness 14.00:00:00
        

Stores user-local catalog settings for the canonical PowerShell Gallery source.

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

Set-ManagedModuleCatalog [-IncludePrerelease <Boolean>] [-MaxStaleness <TimeSpan>] [-Mode <Off|ReadThrough|Fallback|PreferCache|Offline>] [-Name <String>] [-RepositoryKind <Auto|NuGetV3|NuGetV2|LocalFolder>] [-Scope <User|Machine|All>] [-Source <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

IncludePrerelease Boolean optionalposition: namedpipeline: False
Include prerelease versions during catalog refresh.
MaxStaleness TimeSpan optionalposition: namedpipeline: False
Maximum age accepted for stale catalog fallback decisions.
Mode ManagedModuleCatalogCacheMode optionalposition: namedpipeline: Falsevalues: 5
Local catalog cache mode.
Possible values: Off, ReadThrough, Fallback, PreferCache, Offline
Name String optionalposition: 0pipeline: Falsealiases: Repository, RepositoryName
Catalog name, usually the repository name. Defaults to PSGallery.
RepositoryKind ManagedModuleRepositoryKind optionalposition: namedpipeline: Falsevalues: 4
Repository kind used by the catalog refresh path.
Possible values: Auto, NuGetV3, NuGetV2, LocalFolder
Scope ModuleRepositoryProfileScope optionalposition: namedpipeline: Falsevalues: 3
Catalog storage scope.
Possible values: User, Machine, All
Source String optionalposition: namedpipeline: False
Repository source URL used to refresh metadata.

Outputs

PowerForge.ManagedModuleCatalog