Installing powershell module from powershell gallery

I need some advice on installing a powershell module hosted on powershellgallery through an octopus step. My deployment target does not have access to the internet, but my octopus server does.

Hi Brian,

Good question!

Since your target doesn’t have access to the internet, you’ll basically need to treat the module as you do other applications by packaging it up and transferring it over.

I haven’t done this exactly myself but referring to this site Installing PowerShell Modules in Offline Mode (Without Internet Access) | Windows OS Hub (woshub.com) the basic steps would seem to be to install the module on a computer with internet access, save the module (Save-Module), and then zip the folder that is created with Save-Module. From there, you could deploy it similarly as you do other packages with Octopus to the Powershell Modules folder (most likely C:\Program Files\WindowsPowerShell\Modules) as mentioned in that article.

I hope this helps!
Mark