Category
Tutorials
Published
May 11, 2017
There are some situations where you want your PowerShell modules and scripts to be available easily, but you don't want to make them available publicly. This is where "custom" PowerShell repositories come in and can meet your needs.
There are a couple of ways to do this. You can deploy a NuGet feed on a Web Server (this opens up for it to being open to the public later on), and you can put the PowerShell Module NuGet packages on a file share. Azure File Storage makes it possible to create a repository that you can reach from any location, but access to it is still restricted by the credentials to the Storage Account.
Let's do this!
That concludes the process of creating the share. Next step is to map the share on a host.
Many different steps, but the end results are worth it. The final step is registering the share as a PS Repository.This next step can be performed with an ordinary SMB share on the local network as well.
The above steps only needs to be done once per host, assuming you saved the credentials.Once they are done, the below commands are repeatable as soon as you open your prompt or run your builds.
I will cover how to implement this in a build process on a soon-to-come blog post. Stay tuned.
That concludes this how-to.
Remember, after you have performed all the steps above you'll only need to do Publishing a module to the repository and Installing a module from the repository.
Additional reading: Azure File Storage