Recently I have started using a private MyGet feed and my cPowerShellPackageManagement DSC Resource module to manage PowerShell modules on my lab servers.
When new modules are released in PowerShell Gallery (i.e. all the Azure modules), I’d normally use Install-Module to install on test machines, then publish the tested modules to my MyGet feed and then my servers would pick up the new modules.
Although I can use public-module cmdlet to upload the module located locally on my PC to MyGet feed, it can be really time consuming when the module sizes are big (i.e. some of the Azure modules). It only took me few minutes to figure out how do I push modules directly from PowerShell Gallery (or any NuGet feeds) to my MyGet feed.
To configure it, Under the MyGet feed, go to “Package Sources”, and click “Add package source…”
Then choose NuGet feed, fill out name and source
Name: PowerShellGallery
Source: https://www.powershellgallery.com/api/v2/
Once added, I can search PowerShell Gallery and add packages directly to MyGet.
Leave a comment