API Reference
Install-PrivateModule
Installs one or more modules from a private repository, optionally bootstrapping Azure Artifacts registration first.
Remarks
This cmdlet provides the simplified end-user flow for private gallery onboarding. You can point it at an existing repository name or provide Azure Artifacts details and let the cmdlet register the repository before installing the requested modules.
Examples
Install modules from an already registered repository
Install-PrivateModule -Name 'ModuleA', 'ModuleB' -Repository 'Company'
Register an Azure Artifacts repository and install modules in one command
Install-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
Install-PrivateModule [-CredentialSecret <String>] [-CredentialSecretFilePath <String>] [-CredentialUserName <String>] [-Force] -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.
- Force SwitchParameter
- Forces reinstall even when a matching version is already present.
- Name String[]
- Module names to install.
- 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
Install-PrivateModule -AzureArtifactsFeed <String> -AzureDevOpsOrganization <String> [-AzureDevOpsProject <String>] [-BootstrapMode <Auto|ExistingSession|CredentialPrompt>] [-CredentialSecret <String>] [-CredentialSecretFilePath <String>] [-CredentialUserName <String>] [-Force] [-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.
- Force SwitchParameter
- Forces reinstall even when a matching version is already present.
- InstallPrerequisites SwitchParameter
- Installs missing private-gallery prerequisites such as PSResourceGet and the Azure Artifacts credential provider before automatic registration.
- Name String[]
- Module names to install.
- Prerelease SwitchParameter
- Includes prerelease versions when supported by the selected installer.
- Priority Nullable`1
- Optional PSResourceGet repository priority used during automatic registration.
- 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.
Outputs
PowerForge.ModuleDependencyInstallResult