Install a PowerShell MSI package in offline mode

Follow these steps to install a PowerShell MSI package on a Windows server without any internet connection.

  1. From a server connected to the internet, download a Microsoft PowerShell MSI package from the Microsoft website.
  2. Copy the PowerShell MSI setup file to an external media or find a way to get it onto your target system with no internet access.
  3. Copy the PowerShell MSI setup package on your target computer under C:\Packages.
  4. Start a command prompt with administrator privileges.
  5. Run the cd C:\Packages command.
  6. Run the msiexec.exe /package <YourMsiSetup> /quiet ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1 ADD_PATH=1 command, where <YourMsiSetup> is the name of your PowerShell MSI setup file copied in step 3. For example, PowerShell-7.2.6-win-x64.msi. The other settings in the command above are:
  7. The installation is done. ✅