Publishing a module
Use the Publish-Module
command to publish a module to a PowerShell repository.
The most common repository types are a NuGet feed (like the PowerShell Gallery), or a directory (often a file share). There are several free options available for creating a dedicated private PowerShell repository, including:
- Chocolatey Server: https://community.chocolatey.org/packages/chocolatey.server
- Nexus OSS: https://www.sonatype.com/products/repository-oss-download
- ProGet: https://inedo.com/proget/pricing
Each of these allows you to create a private repository for use within an organization. The repository would typically contain internally developed content or curated content that has been approved for internal use copied from public repositories.
To test publishing the LocalMachine
module, create a repository in a local directory:
New-Item ~\PSLocal -ItemType Directory
Register-PSRepository -Name PSLocal -Source ~\PSLocal
Repositories...