Evotec

Project

PSPublishModule

PSPublishModule is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 43
Forks 13
Open issues 1
PowerShell Gallery downloads 13,876
Release v3.0.3
Language: C# Updated: 2026-04-14

API Reference

Cmdlet

Update-ModuleRepository

Namespace PSPublishModule
Inputs
None
Outputs
PSPublishModule.ModuleRepositoryRegistrationResult

Refreshes or repairs an Azure Artifacts private PowerShell module repository registration.

Remarks

This cmdlet uses the same repository resolution logic as Register-ModuleRepository, but is intended for reconnecting or repairing repository configuration after credentials, endpoints, or tool-specific registration details have changed. The output object indicates which native install paths are ready after refresh, so callers can see whether Install-PSResource, Install-Module, or both are available for the configured repository.

Examples

Authored help example

Refresh an Azure Artifacts repository registration


Update-ModuleRepository -AzureDevOpsOrganization 'contoso' -AzureDevOpsProject 'Platform' -AzureArtifactsFeed 'Modules' -PromptForCredential
        

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

Update-ModuleRepository -AzureArtifactsFeed <String> -AzureDevOpsOrganization <String> [-AzureDevOpsProject <String>] [-BootstrapMode <Auto|ExistingSession|CredentialPrompt>] [-CredentialSecret <String>] [-CredentialSecretFilePath <String>] [-CredentialUserName <String>] [-InstallPrerequisites] [-Name <String>] [-Priority <Nullable`1>] [-PromptForCredential] [-Provider <AzureArtifacts>] [-Tool <Auto|PSResourceGet|PowerShellGet|Both>] [-Trusted <Boolean>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AzureArtifactsFeed String requiredposition: namedpipeline: Falsealiases: Feed
Azure Artifacts feed name.
AzureDevOpsOrganization String requiredposition: 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: 3
Bootstrap/authentication mode. Auto uses supplied or prompted credentials when requested; otherwise it prefers ExistingSession when Azure Artifacts prerequisites are ready and falls back to CredentialPrompt when they are not.
Possible values: Auto, ExistingSession, CredentialPrompt
CredentialSecret String optionalposition: namedpipeline: Falsealiases: Password, Token
Optional repository credential secret.
CredentialSecretFilePath String optionalposition: namedpipeline: Falsealiases: CredentialPath, TokenPath
Optional path to a file containing the repository credential secret.
CredentialUserName String optionalposition: namedpipeline: Falsealiases: UserName
Optional repository credential username.
InstallPrerequisites SwitchParameter optionalposition: namedpipeline: False
Installs missing private-gallery prerequisites such as PSResourceGet and the Azure Artifacts credential provider before refresh.
Name String optionalposition: namedpipeline: Falsealiases: Repository
Optional repository name override. Defaults to the feed name.
Priority Nullable`1 optionalposition: namedpipeline: False
Optional PSResourceGet repository priority.
PromptForCredential SwitchParameter optionalposition: namedpipeline: Falsealiases: Interactive
Prompts interactively for repository credentials.
Provider PrivateGalleryProvider optionalposition: namedpipeline: Falsevalues: 1
Private gallery provider. Currently only AzureArtifacts is supported.
Possible values: AzureArtifacts
Tool RepositoryRegistrationTool optionalposition: namedpipeline: Falsevalues: 4
Registration strategy. Auto prefers PSResourceGet and falls back to PowerShellGet when needed.
Possible values: Auto, PSResourceGet, PowerShellGet, Both
Trusted Boolean optionalposition: namedpipeline: False
When true, marks the repository as trusted.

Outputs

PSPublishModule.ModuleRepositoryRegistrationResult: Result returned when registering or refreshing a private module repository.