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

Register-ManagedModuleRepository

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

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

Remarks

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

Examples

Authored help example

EXAMPLE 1


Register-ManagedModuleRepository -Name 'Name'
        

EXAMPLE 2


Register-ManagedModuleRepository -PSGallery
        

EXAMPLE 3


Register-ManagedModuleRepository -Repository @(@{})
        

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

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

Parameters

ApiVersion RepositoryApiVersion optionalposition: namedpipeline: Falsevalues: 6
Repository API version metadata. ContainerRegistry is handled by Microsoft Artifact Registry onboarding.
Possible values: Auto, V2, V3, ContainerRegistry, Local, NugetServer
Force SwitchParameter optionalposition: namedpipeline: False
Replaces an existing managed repository profile with the same name.
Name String requiredposition: 0pipeline: Falsealiases: ProfileName
Repository profile name.
PassThru SwitchParameter optionalposition: namedpipeline: False
Returns the registered profile. The command is quiet by default, like Register-PSResourceRepository.
Priority Int32 optionalposition: namedpipeline: False
Repository priority.
Scope ModuleRepositoryProfileScope optionalposition: namedpipeline: Falsevalues: 3
Profile store scope to write.
Possible values: User, Machine, All
Trusted SwitchParameter optionalposition: namedpipeline: False
Marks the repository profile as trusted.
Uri String requiredposition: 1pipeline: Falsealiases: RepositoryUri
Repository URI or local feed path.

Outputs

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

Register-ManagedModuleRepository [-Force] [-PassThru] [-Priority <Int32>] -PSGallery [-Scope <User|Machine|All>] [-Trusted] [<CommonParameters>]
#
Parameter set: PSGallery

Parameters

Force SwitchParameter optionalposition: namedpipeline: False
Replaces an existing managed repository profile with the same name.
PassThru SwitchParameter optionalposition: namedpipeline: False
Returns the registered profile. The command is quiet by default, like Register-PSResourceRepository.
Priority Int32 optionalposition: namedpipeline: False
Repository priority.
PSGallery SwitchParameter requiredposition: namedpipeline: False
Registers the built-in PowerShell Gallery profile.
Scope ModuleRepositoryProfileScope optionalposition: namedpipeline: Falsevalues: 3
Profile store scope to write.
Possible values: User, Machine, All
Trusted SwitchParameter optionalposition: namedpipeline: False
Marks the repository profile as trusted.

Outputs

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

Register-ManagedModuleRepository [-Force] [-PassThru] -Repository <Hashtable[]> [-Scope <User|Machine|All>] [<CommonParameters>]
#
Parameter set: Repository

Parameters

Force SwitchParameter optionalposition: namedpipeline: False
Replaces an existing managed repository profile with the same name.
PassThru SwitchParameter optionalposition: namedpipeline: False
Returns the registered profile. The command is quiet by default, like Register-PSResourceRepository.
Repository Hashtable[] requiredposition: namedpipeline: True (ByValue)
Repository definitions shaped like Register-PSResourceRepository -Repository input.
Scope ModuleRepositoryProfileScope optionalposition: namedpipeline: Falsevalues: 3
Profile store scope to write.
Possible values: User, Machine, All

Outputs

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