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

Set-ManagedModuleRepository

Namespace PSPublishModule
Inputs
None
Outputs
PSPublishModule.ModuleRepositoryProfileResult

Creates or updates a saved managed module repository profile.

Remarks

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

Authored help example

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.

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

Set-ManagedModuleRepository [-AzureArtifactsFeed <String>] [-AzureDevOpsOrganization <String>] [-AzureDevOpsProject <String>] [-BootstrapMode <Auto|ExistingSession|CredentialPrompt|JFrogCli>] [-GitHubOwner <String>] [-JFrogBaseUri <String>] [-JFrogRepository <String>] -Name <String> [-Priority <Int32>] [-Provider <AzureArtifacts>] [-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

Parameters

AzureArtifactsFeed String optionalposition: namedpipeline: Falsealiases: Feed
Azure Artifacts feed name.
AzureDevOpsOrganization String optionalposition: namedpipeline: Falsealiases: Organization
Azure DevOps organization name.
AzureDevOpsProject String optionalposition: namedpipeline: Falsealiases: Project
Optional Azure DevOps project name for project-scoped feeds.
BootstrapMode PrivateGalleryBootstrapMode optionalposition: namedpipeline: Falsealiases: Modevalues: 4
Bootstrap/authentication mode saved in the profile. Defaults to ExistingSession for Azure Artifacts Credential Provider login.
Possible values: Auto, ExistingSession, CredentialPrompt, JFrogCli
GitHubOwner String optionalposition: namedpipeline: Falsealiases: Namespace, Owner
GitHub user or organization namespace for GitHub Packages. Defaults from Repository when omitted.
JFrogBaseUri String optionalposition: namedpipeline: False
JFrog Artifactory base URI, for example https://company.jfrog.io/artifactory.
JFrogRepository String optionalposition: namedpipeline: False
JFrog NuGet repository key. Defaults from Repository when omitted.
Name String requiredposition: 0pipeline: Falsealiases: ProfileName
Repository profile name used by managed find, save, install, update, repair, and publish commands.
Priority Int32 optionalposition: namedpipeline: False
Optional PSResourceGet repository priority.
Provider PrivateGalleryProvider optionalposition: namedpipeline: Falsevalues: 6
Private gallery provider.
Possible values: AzureArtifacts, Azure, JFrog, NuGet, GitHubPackages, GitHub
Repository String optionalposition: namedpipeline: False
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 optionalposition: namedpipeline: False
Optional local repository name override. Defaults to the provider repository/feed id.
RepositoryPublishUri String optionalposition: namedpipeline: False
PowerShellGet publish URI for generic/JFrog feeds.
RepositorySourceUri String optionalposition: namedpipeline: False
PowerShellGet source URI for generic/JFrog feeds.
RepositoryUri String optionalposition: namedpipeline: False
PSResourceGet v3 repository URI for generic/JFrog feeds.
Scope ModuleRepositoryProfileScope optionalposition: namedpipeline: Falsevalues: 3
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 optionalposition: namedpipeline: Falsevalues: 4
Registration strategy saved in the profile. Defaults to PSResourceGet for Entra-first Azure Artifacts use.
Possible values: Auto, PSResourceGet, PowerShellGet, Both
Trusted Boolean optionalposition: namedpipeline: False
When true, marks the repository as trusted during registration.

Outputs

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