# Register-ManagedModuleRepository

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

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

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

[#](#method-register-managedmodulerepository-repositoryapiversion-switchparameter-string-switchparameter-int32-modulerepositoryprofilescope-switchparameter-string)

Parameter set: `Name`

```
Register-ManagedModuleRepository
[-Force]
[-PassThru]
[-Priority <Int32>]
-PSGallery
[-Scope <User|Machine|All>]
[-Trusted]
[<CommonParameters>]
```

[#](#method-register-managedmodulerepository-switchparameter-switchparameter-int32-switchparameter-modulerepositoryprofilescope-switchparameter)

Parameter set: `PSGallery`

```
Register-ManagedModuleRepository
[-Force]
[-PassThru]
-Repository <Hashtable[]>
[-Scope <User|Machine|All>]
[<CommonParameters>]
```

[#](#method-register-managedmodulerepository-switchparameter-switchparameter-hashtable-modulerepositoryprofilescope)

Parameter set: `Repository`

## Examples

### Example 1

```powershell
Register-ManagedModuleRepository -Name 'Name'
```

### Example 2

```powershell
Register-ManagedModuleRepository -PSGallery
```

### Example 3

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

## Outputs

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

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:611246EDF7C2221D9F3FEFA0730C97401ECD38F25DF18DE371B6631A1D843469 -->
