API Reference
Update-ModuleRepository
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
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>]
#
All Parameter SetsParameters
- AzureArtifactsFeed String
- Azure Artifacts feed name.
- AzureDevOpsOrganization String
- Azure DevOps organization name.
- AzureDevOpsProject String
- Optional Azure DevOps project name for project-scoped feeds.
- BootstrapMode PrivateGalleryBootstrapMode
- 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
- Optional repository credential secret.
- CredentialSecretFilePath String
- Optional path to a file containing the repository credential secret.
- CredentialUserName String
- Optional repository credential username.
- InstallPrerequisites SwitchParameter
- Installs missing private-gallery prerequisites such as PSResourceGet and the Azure Artifacts credential provider before refresh.
- Name String
- Optional repository name override. Defaults to the feed name.
- Priority Nullable`1
- Optional PSResourceGet repository priority.
- PromptForCredential SwitchParameter
- Prompts interactively for repository credentials.
- Provider PrivateGalleryProvider
- Private gallery provider. Currently only AzureArtifacts is supported.
- Possible values:
AzureArtifacts - Tool RepositoryRegistrationTool
- Registration strategy. Auto prefers PSResourceGet and falls back to PowerShellGet when needed.
- Possible values:
Auto,PSResourceGet,PowerShellGet,Both - Trusted Boolean
- When true, marks the repository as trusted.
Outputs
PSPublishModule.ModuleRepositoryRegistrationResult: Result returned when registering or refreshing a private module repository.