PSA: Upload your PowerShell Modules!

Publish-ModuleFor some time now, the PowerShell Gallery has been available, enabling the upload of PowerShell modules to a centralized repository. This repository provides an easily discoverable location from PowerShell 5.0’s PowerShellGet module. In order to install a PowerShell module in PowerShell 5.0, a user must simply type Install-Module -Name <ModuleName>. The module gallery is still in a limited preview stage, so only certain users will be approved to upload PowerShell modules. However, if you are a Microsoft MVP, or otherwise have been approved to upload your modules to the gallery, please do so!

As previously stated, the PowerShellGet module is what enables interaction with the PowerShell Gallery. This module sits on top of the PackageManagement (formerly OneGet) module, using the PSModulepackage provider” that is exposed by PowerShellGet. If you want to upload your PowerShell module to the gallery, simply use the Publish-Module PowerShell command from a PS 5.0 system.

Once you’re registered in the PowerShell Gallery, you can obtain your “NuGet API key” from your account settings. When calling the Publish-Module command, you’ll use this API key to authenticate you to the gallery, via the -NuGetApiKey parameter.

After uploading your PowerShell module to the gallery, make sure that the PowerShell user base knows that it’s available! Spread the word on your blog Twitter, and other social media channels. You’ll make it easier for PowerShell developers to utilize your module, and you will gain additional exposure by having the module available on the gallery!