Project

PSPublishModule

Build, test, version, sign, and publish PowerShell modules with reusable PowerForge pipelines.

Stars 48
Forks 16
PowerShell Gallery downloads 17,213
Release v3.0.169
Language: C# Updated: 2026-10-13

API Reference

Command

Publish-ManagedModule

Namespace PSPublishModule
Inputs
None
Outputs
PowerForge.ManagedModulePublishResult

Publishes a PowerShell module package through the managed C# module engine.

Remarks

This command provides the module-publish functionality of Publish-PSResource. It can create a NuGet package from a module folder or publish an existing .nupkg file to a local folder feed or NuGet-compatible package publish endpoint. Microsoft Artifact Registry module prefixes are not applied because the managed repository client does not yet expose a container-registry transport.

Examples

Authored help example

Publish a module to a local folder feed


Publish-ManagedModule -Path C:\Source\Company.Tools -Repository C:\Packages
        

Publish an existing package without repacking it


Publish-ManagedModule -NupkgPath C:\Packages\Company.Tools.1.2.0.nupkg -Repository CompanyFeed
        

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

Publish-ManagedModule [-ApiKey <String>] [-ApiKeyFilePath <String>] [-Authors <String>] [-Credential <PSCredential>] [-Description <String>] [-Force] [-ManifestPath <String>] [-Name <String>] [-OutputDirectory <String>] -Path <String> [-ProfileName <String>] [-ProjectUrl <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Repository <String>] [-RepositoryName <String>] [-ShowSummary] [-SkipDependenciesCheck] [-SkipModuleManifestValidate] [-Tags <String[]>] [-Version <String>] [<CommonParameters>]
#
Parameter set: PathParameterSet

Parameters

ApiKey String optionalposition: namedpipeline: Falsealiases: NuGetApiKey
API key used by NuGet-compatible package publish endpoints.
ApiKeyFilePath String optionalposition: namedpipeline: Falsealiases: ApiKeyPath, NuGetApiKeyPath
Optional path to a file containing the API key.
Authors String optionalposition: namedpipeline: False
Optional authors override.
Credential PSCredential optionalposition: namedpipeline: False
Optional repository credential.
Description String optionalposition: namedpipeline: False
Optional description override.
Force SwitchParameter optionalposition: namedpipeline: False
Overwrite an existing package.
ManifestPath String optionalposition: namedpipeline: False
Optional explicit module manifest path.
Name String optionalposition: namedpipeline: False
Optional package id override.
OutputDirectory String optionalposition: namedpipeline: Falsealiases: DestinationPath, OutputPath
Directory that receives the created or supplied package; it is also the local target when Repository is omitted.
Path String requiredposition: 0pipeline: Falsealiases: ModulePath
Module folder to package.
ProfileName String optionalposition: namedpipeline: False
Saved module repository profile to use instead of Repository or OutputDirectory.
ProjectUrl String optionalposition: namedpipeline: False
Optional project URL override.
Proxy Uri optionalposition: namedpipeline: False
Optional HTTP proxy used for repository requests.
ProxyCredential PSCredential optionalposition: namedpipeline: False
Optional proxy credential used with Proxy.
Repository String optionalposition: 1pipeline: Falsealiases: RepositoryPath, RepositoryUri, Source
Repository URL, NuGet v3 service index, publish endpoint, or local folder feed.
RepositoryName String optionalposition: namedpipeline: False
Friendly repository name used in output.
ShowSummary SwitchParameter optionalposition: namedpipeline: False
Write a compact Spectre.Console summary for the publish result.
SkipDependenciesCheck SwitchParameter optionalposition: namedpipeline: False
Skip checking RequiredModules against the target repository.
SkipModuleManifestValidate SwitchParameter optionalposition: namedpipeline: False
Skip managed manifest metadata validation before packaging.
Tags String[] optionalposition: namedpipeline: False
Optional package tags override.
Version String optionalposition: namedpipeline: False
Optional package version override.

Outputs

PowerForge.ManagedModulePublishResult

Publish-ManagedModule [-ApiKey <String>] [-ApiKeyFilePath <String>] [-Credential <PSCredential>] [-Force] -NupkgPath <String> [-OutputDirectory <String>] [-ProfileName <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Repository <String>] [-RepositoryName <String>] [-ShowSummary] [-SkipDependenciesCheck] [<CommonParameters>]
#
Parameter set: NupkgPathParameterSet

Parameters

ApiKey String optionalposition: namedpipeline: Falsealiases: NuGetApiKey
API key used by NuGet-compatible package publish endpoints.
ApiKeyFilePath String optionalposition: namedpipeline: Falsealiases: ApiKeyPath, NuGetApiKeyPath
Optional path to a file containing the API key.
Credential PSCredential optionalposition: namedpipeline: False
Optional repository credential.
Force SwitchParameter optionalposition: namedpipeline: False
Overwrite an existing package.
NupkgPath String requiredposition: namedpipeline: False
Existing .nupkg file to publish without repacking a module folder.
OutputDirectory String optionalposition: namedpipeline: Falsealiases: DestinationPath, OutputPath
Directory that receives the created or supplied package; it is also the local target when Repository is omitted.
ProfileName String optionalposition: namedpipeline: False
Saved module repository profile to use instead of Repository or OutputDirectory.
Proxy Uri optionalposition: namedpipeline: False
Optional HTTP proxy used for repository requests.
ProxyCredential PSCredential optionalposition: namedpipeline: False
Optional proxy credential used with Proxy.
Repository String optionalposition: 1pipeline: Falsealiases: RepositoryPath, RepositoryUri, Source
Repository URL, NuGet v3 service index, publish endpoint, or local folder feed.
RepositoryName String optionalposition: namedpipeline: False
Friendly repository name used in output.
ShowSummary SwitchParameter optionalposition: namedpipeline: False
Write a compact Spectre.Console summary for the publish result.
SkipDependenciesCheck SwitchParameter optionalposition: namedpipeline: False
Skip checking RequiredModules against the target repository.

Outputs

PowerForge.ManagedModulePublishResult