Chapter 22. Publishing your script
Our hope is that while working your way through this book, or shortly thereafter, you’ll come up with a wonderful, well-written PowerShell tool that solves an immediate problem. It will be even better if it gets you a big raise. But more than that, we hope you’ll share it with the rest of the PowerShell community. For the last few years, this has been easy to do using the PowerShell Gallery from Microsoft. Right now, it contains more than 3,300 modules and 300 scripts.
One primary advantage of publishing your script is pure altruism: You’re adding something positive to the greater PowerShell-good. Let us be the first to thank you in advance. It’s also a great mechanism for sharing your tools with co-workers or even yourself. You can publish your current version to the PowerShell Gallery (also referred to as the PSGallery) and install or update it locally as needed. Have a new version? Publish it to the gallery. Your old versions remain available, so if you need to install an older version to test something, you can.