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

Set-ManagedModuleCatalog

Module
PSPublishModule
Inputs
None
Outputs
PowerForge.ManagedModuleCatalog

Creates or updates local managed module catalog cache settings.

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

Description

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

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.

Parameters

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

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.