There are many possible ways in which you can install a PowerShell module and most of us are probably using the nuget package manager to achieve this. But what if you want to install a PowerShell module without having access to the internet on a particular machine?
First of all, on a machine with internet access, find your desired module. For this example we are going to use the Firewall-Manager module.
Once we know how our module is called, open up PowerShell and download the module somewhere on the machine with Save-Module:
Save-Module Firewall-Manager -path C:\temp
This will download the entire module into C:\Temp. If the Save-Module outputs any error, try to first install the PowerShellGet:
Copy-Item ‘C:\temp\Firewall-Manager’ ‘C:\Program Files\WindowsPowerShell\Modules’ -Recurse
Note: If you copy the module into “C:\Program Files\…” this will make it available for all the users on the machine. If you want the module to be accessed only by a particular user, this must be copied into “C:\Users\THEUSERNAME\Documents\WindowsPowerShell\Modules”.
At the end, you should have a structure something like this:
If we refresh the commands in PowerShell ISE after installation, the additional cmdlets should appear