I'd like to install some items from the PowerShell Gallery. However, the servers do not have access to the internet, not even our test servers. It is possible to allow them to have access, but the process to do that is impractical.

The Getting Started page indicates that modules and scripts get installed to $env:ProgramFiles\WindowsPowerShell\Modules and \Scripts respectively. Is this all that is necessary, or is there some other registration that needs to be done?

My plan is to download the scripts and modules I need and then copy them to the above mentioned path(s) on the offline servers. Will this work?


In general a xcopy deployment of PowerShell modules is possible, just copy the files. You don't even have to use $env:ProgramFiles\WindowsPowerShell\Modules, put them anywhere you like, as long as you have that location in $env:PSModulePath.

But this will only work if the module uses only PowerShell code files and .NET assemblies. There may be modules that use COM components or other dependencies that have to be installed on each machine.

All modules I am using work fine with xcopy deployment but to be sure you should just test the modules you are using.

You may also consider setting up your own PowerShell gallery inside your organisation and deploy modules from there.

  • On the topic of the PowerShell gallery. Is it possible to use an existing NuGet.Server implementation, or is PSPrivateGallery the only way to go? – kettch Jul 7 '16 at 14:52
  • @kettch - To be honest, I don't know. I haven't done this myself. – Peter Hahndorf Jul 7 '16 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.