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

Install-PrivateModule

Namespace PSPublishModule
Inputs
None
Outputs
PowerForge.ModuleDependencyInstallResult

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

Authored help example

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>]
#
Parameter set: Repository

Parameters

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.
Force SwitchParameter optionalposition: namedpipeline: False
Forces reinstall even when a matching version is already present.
Name String[] requiredposition: 0pipeline: Falsealiases: ModuleName
Module names to install.
Prerelease SwitchParameter optionalposition: namedpipeline: False
Includes prerelease versions when supported by the selected installer.
PromptForCredential SwitchParameter optionalposition: namedpipeline: Falsealiases: Interactive
Prompts interactively for repository credentials.
Repository String requiredposition: namedpipeline: False
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>]
#
Parameter set: AzureArtifacts

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 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 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.
Force SwitchParameter optionalposition: namedpipeline: False
Forces reinstall even when a matching version is already present.
InstallPrerequisites SwitchParameter optionalposition: namedpipeline: False
Installs missing private-gallery prerequisites such as PSResourceGet and the Azure Artifacts credential provider before automatic registration.
Name String[] requiredposition: 0pipeline: Falsealiases: ModuleName
Module names to install.
Prerelease SwitchParameter optionalposition: namedpipeline: False
Includes prerelease versions when supported by the selected installer.
Priority Nullable`1 optionalposition: namedpipeline: False
Optional PSResourceGet repository priority used during automatic registration.
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
RepositoryName String optionalposition: namedpipeline: False
Optional repository name override when Azure Artifacts details are supplied.
Tool RepositoryRegistrationTool optionalposition: namedpipeline: Falsevalues: 4
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 optionalposition: namedpipeline: False
When true, marks the repository as trusted during automatic registration.

Outputs

PowerForge.ModuleDependencyInstallResult