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

Set-ManagedModuleRepository

Module
PSPublishModule
Inputs
None
Outputs
PSPublishModule.ModuleRepositoryProfileResult

Creates or updates a saved managed module repository profile.

Syntax

Set-ManagedModuleRepository
[-AzureArtifactsFeed <String>]
[-AzureDevOpsOrganization <String>]
[-AzureDevOpsProject <String>]
[-BootstrapMode <Auto|ExistingSession|CredentialPrompt|JFrogCli>]
[-GitHubOwner <String>]
[-JFrogBaseUri <String>]
[-JFrogRepository <String>]
[-Name] <String>
[-Priority <Int32>]
[-Provider <PrivateGalleryProvider>]
[-Repository <String>]
[-RepositoryName <String>]
[-RepositoryPublishUri <String>]
[-RepositorySourceUri <String>]
[-RepositoryUri <String>]
[-Scope <User|Machine|All>]
[-Tool <Auto|PSResourceGet|PowerShellGet|Both>]
[-Trusted <Boolean>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Profiles store non-secret repository shape, trust, bootstrap, and publish-source settings used by the managed module lifecycle commands. Secrets stay in credentials, environment variables, secret files, or provider sessions.

Examples

Create an Entra-first Azure Artifacts profile

Set-ManagedModuleRepository -Name Company -AzureDevOpsOrganization contoso -AzureDevOpsProject Platform -AzureArtifactsFeed Modules

Saves a user-local profile that later commands can reference with -ProfileName Company.

Use a different local repository name

Set-ManagedModuleRepository -Name Finance -AzureDevOpsOrganization contoso -AzureDevOpsProject Platform -AzureArtifactsFeed InternalModules -RepositoryName CompanyModules -Priority 20

Stores the Azure Artifacts feed identity while registering it locally as CompanyModules.

Parameters

-AzureArtifactsFeed String optionalaliases: Feed
Azure Artifacts feed name.
-AzureDevOpsOrganization String optionalaliases: Organization
Azure DevOps organization name.
-AzureDevOpsProject String optionalaliases: Project
Optional Azure DevOps project name for project-scoped feeds.
-BootstrapMode PrivateGalleryBootstrapMode optionalaliases: Mode
Bootstrap/authentication mode saved in the profile. Defaults to ExistingSession for Azure Artifacts Credential Provider login.
Possible values: Auto, ExistingSession, CredentialPrompt, JFrogCli
-GitHubOwner String optionalaliases: Namespace, Owner
GitHub user or organization namespace for GitHub Packages. Defaults from Repository when omitted.
-JFrogBaseUri String optional
JFrog Artifactory base URI, for example https://company.jfrog.io/artifactory.
-JFrogRepository String optional
JFrog NuGet repository key. Defaults from Repository when omitted.
-Name String requiredposition: 0aliases: ProfileName
Repository profile name used by managed find, save, install, update, repair, and publish commands.
-Priority Int32 optional
Optional PSResourceGet repository priority.
-Provider PrivateGalleryProvider optional
Private gallery provider.
Possible values: AzureArtifacts, Azure, JFrog, NuGet, GitHubPackages, GitHub
-Repository String optional
Provider repository/feed id. For Azure this is the feed when AzureArtifactsFeed is omitted; for JFrog this is the Artifactory NuGet repository key.
-RepositoryName String optional
Optional local repository name override. Defaults to the provider repository/feed id.
-RepositoryPublishUri String optional
PowerShellGet publish URI for generic/JFrog feeds.
-RepositorySourceUri String optional
PowerShellGet source URI for generic/JFrog feeds.
-RepositoryUri String optional
PSResourceGet v3 repository URI for generic/JFrog feeds.
-Scope ModuleRepositoryProfileScope optional
Profile store scope to write. Use Machine from an elevated/admin deployment to share non-secret feed settings with all users.
Possible values: User, Machine, All
-Tool RepositoryRegistrationTool optional
Registration strategy saved in the profile. Defaults to PSResourceGet for Entra-first Azure Artifacts use.
Possible values: Auto, PSResourceGet, PowerShellGet, Both
-Trusted Boolean optional
When true, marks the repository as trusted during registration.

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.