Installing PowerShellGet

PowerShellGet is an in-box module in the following releases

Before updating PowerShellGet, you should always install the latest NuGet provider. From an elevated PowerShell session, run the following command.

Install-PackageProvider -Name NuGet -Force

For systems with PowerShell 5.0 (or newer) you can install the latest PowerShellGet

To install PowerShellGet on Windows 10, Windows Server 2016, any system with WMF 5.0 or 5.1 installed, or any system with PowerShell 6, run the following commands from an elevated PowerShell session.

Install-Module -Name PowerShellGet -Force

Use Update-Module to get newer versions.

Update-Module -Name PowerShellGet

For computers running PowerShell 3.0 or PowerShell 4.0

These instructions apply to computers that have the PackageManagement Preview installed or don't have any version of PowerShellGet installed.

The Save-Module cmdlet is used in both sets of instructions. Save-Module downloads and saves a module and any dependencies from a registered repository. The module's most current version is saved to a specified path on the local computer, but isn't installed. To install the modules in PowerShell 3.0 or 4.0, copy the module saved folders to $env:ProgramFiles\WindowsPowerShell\Modules.

For more information, see Save-Module.


PowerShell 3.0 and PowerShell 4.0 only supported one version of a module. Starting in PowerShell 5.0, modules are installed in <modulename>\<version>. This allowed you to install multiple versions side-by-side. After downloading the module using Save-Module you must copy the files from the <modulename>\<version> to the <modulename> folder on the destination machine.

Computers with the PackageManagement Preview installed

  1. From a PowerShell session, use Save-Module to save the modules to a local directory.

    Save-Module -Name PowerShellGet -Path C:\LocalFolder -Repository PSGallery
  2. Ensure that the PowerShellGet and PackageManagement modules aren't loaded in any other processes.

  3. Delete the contents of the folders: $env:ProgramFiles\WindowsPowerShell\Modules\PowerShellGet\ and $env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\.

  4. Reopen the PowerShell console with elevated permissions and run the following commands.

    Copy-Item "C:\LocalFolder\PowerShellGet\<version>\*" "$env:ProgramFiles\WindowsPowerShell\Modules\PowerShellGet\" -Recurse -Force
    Copy-Item "C:\LocalFolder\PackageManagement\<version>\*" "$env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\" -Recurse -Force

Computers without PowerShellGet

For computer's without any version of PowerShellGet installed, a computer with PowerShellGet installed is needed to download the modules.

  1. From the computer that has PowerShellGet installed, use Save-Module to download the current version of PowerShellGet. Two folders are downloaded: PowerShellGet and PackageManagement. Each folder contains a subfolder with a version number.

    Save-Module -Name PowerShellGet -Path C:\LocalFolder -Repository PSGallery
  2. Copy the PowerShellGet and PackageManagement folders to the computer that doesn't have PowerShellGet installed.

    The destination directory is: $env:ProgramFiles\WindowsPowerShell\Modules