API Reference
Update-PrivateModule
Updates one or more modules from a private repository, optionally refreshing Azure Artifacts registration first.
Remarks
This cmdlet is the day-to-day maintenance companion to Install-PrivateModule. When Azure Artifacts details are provided, the repository registration is refreshed before the update is attempted.
Examples
Update modules from an already registered repository
Update-PrivateModule -Name 'ModuleA', 'ModuleB' -Repository 'Company'
Refresh an Azure Artifacts repository and update modules in one command
Update-PrivateModule -Name 'ModuleA', 'ModuleB' -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-PrivateModule [-CredentialSecret <String>] [-CredentialSecretFilePath <String>] [-CredentialUserName <String>] -Name <String[]> [-Prerelease] [-PromptForCredential] -Repository <String> [<CommonParameters>]
#
RepositoryParameters
- CredentialSecret String
- Optional repository credential secret.
- CredentialSecretFilePath String
- Optional path to a file containing the repository credential secret.
- CredentialUserName String
- Optional repository credential username.
- Name String[]
- Module names to update.
- Prerelease SwitchParameter
- Includes prerelease versions when supported by the selected installer.
- PromptForCredential SwitchParameter
- Prompts interactively for repository credentials.
- Repository String
- Name of an already registered repository.
Outputs
PowerForge.ModuleDependencyInstallResult
Update-PrivateModule -AzureArtifactsFeed <String> -AzureDevOpsOrganization <String> [-AzureDevOpsProject <String>] [-BootstrapMode <Auto|ExistingSession|CredentialPrompt>] [-CredentialSecret <String>] [-CredentialSecretFilePath <String>] [-CredentialUserName <String>] [-InstallPrerequisites] -Name <String[]> [-Prerelease] [-Priority <Nullable`1>] [-PromptForCredential] [-Provider <AzureArtifacts>] [-RepositoryName <String>] [-Tool <Auto|PSResourceGet|PowerShellGet|Both>] [-Trusted <Boolean>] [<CommonParameters>]
#
AzureArtifactsParameters
- 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 used when Azure Artifacts details are supplied. Auto 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 automatic registration refresh.
- Name String[]
- Module names to update.
- Prerelease SwitchParameter
- Includes prerelease versions when supported by the selected installer.
- Priority Nullable`1
- Optional PSResourceGet repository priority used during automatic registration refresh.
- PromptForCredential SwitchParameter
- Prompts interactively for repository credentials.
- Provider PrivateGalleryProvider
- Private gallery provider. Currently only AzureArtifacts is supported.
- Possible values:
AzureArtifacts - RepositoryName String
- Optional repository name override when Azure Artifacts details are supplied.
- Tool RepositoryRegistrationTool
- Registration strategy used when Azure Artifacts details are supplied. 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 during automatic registration refresh.
Outputs
PowerForge.ModuleDependencyInstallResult