Command
Register-ManagedModuleRepository
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:
NameRegister-ManagedModuleRepository
[-Force]
[-PassThru]
[-Priority <Int32>]
-PSGallery
[-Scope <User| Machine| All>]
[-Trusted]
[<CommonParameters>]#Parameter set:
PSGalleryRegister-ManagedModuleRepository
[-Force]
[-PassThru]
-Repository <Hashtable[]>
[-Scope <User| Machine| All>]
[<CommonParameters>]#Parameter set:
RepositoryExamples
Example 1
Register-ManagedModuleRepository -Name 'Name'Example 2
Register-ManagedModuleRepository -PSGalleryExample 3
Register-ManagedModuleRepository -Repository @(@{})Parameters
- -ApiVersion RepositoryApiVersion
- Repository API version metadata. ContainerRegistry is handled by Microsoft Artifact Registry onboarding.
- Possible values:
Auto,V2,V3,ContainerRegistry,Local,NugetServer - -Force SwitchParameter
- Replaces an existing managed repository profile with the same name.
- -Name String
- Repository profile name.
- -PassThru SwitchParameter
- Returns the registered profile. The command is quiet by default, like Register-PSResourceRepository.
- -Priority Int32
- Repository priority.
- -Scope ModuleRepositoryProfileScope
- Profile store scope to write.
- Possible values:
User,Machine,All - -Trusted SwitchParameter
- Marks the repository profile as trusted.
- -Uri String
- Repository URI or local feed path.
- -PSGallery SwitchParameter
- Registers the built-in PowerShell Gallery profile.
- -Repository Hashtable[]
- 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.