Publish-ManagedModule
Publishes a PowerShell module package through the managed C# module engine.
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>]#PathParameterSetPublish-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>]#NupkgPathParameterSetDescription
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
Publish a module to a local folder feed
Publish-ManagedModule -Path C:\Source\Company.Tools -Repository C:\PackagesPublish an existing package without repacking it
Publish-ManagedModule -NupkgPath C:\Packages\Company.Tools.1.2.0.nupkg -Repository CompanyFeedParameters
- -ApiKey String
- API key used by NuGet-compatible package publish endpoints.
- -ApiKeyFilePath String
- Optional path to a file containing the API key.
- Optional authors override.
- -Credential PSCredential
- Optional repository credential.
- -Description String
- Optional description override.
- -Force SwitchParameter
- Overwrite an existing package.
- -ManifestPath String
- Optional explicit module manifest path.
- -Name String
- Optional package id override.
- -OutputDirectory String
- Directory that receives the created or supplied package; it is also the local target when Repository is omitted.
- -Path String
- Module folder to package.
- -ProfileName String
- Saved module repository profile to use instead of Repository or OutputDirectory.
- -ProjectUrl String
- Optional project URL override.
- -Proxy Uri
- Optional HTTP proxy used for repository requests.
- -ProxyCredential PSCredential
- Optional proxy credential used with Proxy.
- -Repository String
- Repository URL, NuGet v3 service index, publish endpoint, or local folder feed.
- -RepositoryName String
- Friendly repository name used in output.
- -ShowSummary SwitchParameter
- Write a compact Spectre.Console summary for the publish result.
- -SkipDependenciesCheck SwitchParameter
- Skip checking RequiredModules against the target repository.
- -SkipModuleManifestValidate SwitchParameter
- Skip managed manifest metadata validation before packaging.
- Optional package tags override.
- -Version String
- Optional package version override.
- -NupkgPath String
- Existing .nupkg file to publish without repacking a module folder.
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.