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

Register-ManagedModuleRepository

Module
PSPublishModule
Inputs
System.Collections.Hashtable[]
Outputs
PSPublishModule.ModuleRepositoryProfileResult

Registers a managed module repository profile using PSResourceGet-shaped parameters.

Syntax

Register-ManagedModuleRepository
[-ApiVersion <RepositoryApiVersion>]
[-Force]
[-Name] <String>
[-PassThru]
[-Priority <Int32>]
[-Scope <User|Machine|All>]
[-Trusted]
[-Uri] <String>
[<CommonParameters>]
#
Parameter set: Name
Register-ManagedModuleRepository
[-Force]
[-PassThru]
[-Priority <Int32>]
-PSGallery
[-Scope <User|Machine|All>]
[-Trusted]
[<CommonParameters>]
#
Parameter set: PSGallery
Register-ManagedModuleRepository
[-Force]
[-PassThru]
-Repository <Hashtable[]>
[-Scope <User|Machine|All>]
[<CommonParameters>]
#
Parameter set: Repository

Examples

Example 1

Register-ManagedModuleRepository -Name 'Name'

Example 2

Register-ManagedModuleRepository -PSGallery

Example 3

Register-ManagedModuleRepository -Repository @(@{})

Parameters

-ApiVersion RepositoryApiVersion optionalsets: Name
Repository API version metadata. ContainerRegistry is handled by Microsoft Artifact Registry onboarding.
Possible values: Auto, V2, V3, ContainerRegistry, Local, NugetServer
-Force SwitchParameter optional
Replaces an existing managed repository profile with the same name.
-Name String requiredposition: 0aliases: ProfileNamesets: Name
Repository profile name.
-PassThru SwitchParameter optional
Returns the registered profile. The command is quiet by default, like Register-PSResourceRepository.
-Priority Int32 optionalsets: Name, PSGallery
Repository priority.
-Scope ModuleRepositoryProfileScope optional
Profile store scope to write.
Possible values: User, Machine, All
-Trusted SwitchParameter optionalsets: Name, PSGallery
Marks the repository profile as trusted.
-Uri String requiredposition: 1aliases: RepositoryUrisets: Name
Repository URI or local feed path.
-PSGallery SwitchParameter requiredsets: PSGallery
Registers the built-in PowerShell Gallery profile.
-Repository Hashtable[] requiredpipeline: True (ByValue)sets: Repository
Repository definitions shaped like Register-PSResourceRepository -Repository input.

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.

Outputs

PSPublishModule.ModuleRepositoryProfileResult: User-facing private module repository profile saved by PSPublishModule.