# Set-ManagedModuleCatalog

Creates or updates local managed module catalog cache settings.

Project

PSPublishModule

Build, test, version, sign, and publish PowerShell modules with reusable PowerForge pipelines.

[View on GitHub](https://github.com/EvotecIT/PSPublishModule) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSPublishModule/releases/tag/v3.0.124) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSPublishModule/2.0.27)

Stars **48**

Forks **15**

Open issues **1**

PowerShell Gallery downloads **17,213**

Release **v3.0.195**

Language: C# Updated: 2026-11-25

Command 

**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>]
```

[#](#method-set-managedmodulecatalog-boolean-timespan-managedmodulecatalogcachemode-string-managedmodulerepositorykind-modulerepositoryprofilescope-string)

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

```powershell
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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:6444499B3179C0085F22DEE85094AF350B8D34D1AA82D830AACEB3035DDD112D -->
