Package management for PowerShell

Microsoft provides three package management tools for PowerShell:

  • The Microsoft.PowerShell.PSResourceGet module - shipped originally in PowerShell 7.4.0
  • The PowerShellGet and PackageManagement modules - shipped originally in Windows PowerShell 5.0
  • The NuGet module used by the Package Manager Console of Visual Studio

This documentation covers the PowerShellGet, PackageManagement, and Microsoft.PowerShell.PSResourceGet modules. These modules contain cmdlets for discovering, installing, updating, and publishing PowerShell packages from the PowerShell Gallery. These packages can contain artifacts such as Modules, DSC Resources, and Scripts. The Microsoft.PowerShell.PSResourceGet module replaces the PowerShellGet and PackageManagement modules.

Note

The NuGet module contains cmdlets for discovering and installing packages from the NuGet Gallery for use with Visual Studio projects. For information about the NuGet module, see the NuGet module reference in the Visual Studio documentation.

Supported versions:

  • Current release
    • Microsoft.PowerShell.PSResourceGet 1.0.6 - a standalone module that doesn't depend on the PowerShellGet or PackageManagement modules
    • PowerShellGet 2.2.5 with PackageManagement 1.4.8.1
  • Preview release
    • Microsoft.PowerShell.PSResourceGet 1.1.0-rc2 - adds Compress-PSResource to create .nupkg files, the ability to publish .nupkg files, and support configuration Group Policy.
    • PowerShellGet 3.0.23-beta23 - a compatibility module that contains proxy cmdlets that call the new cmdlets in Microsoft.PowerShell.PSResourceGet. The proxy cmdlets allow you to continue to use the old cmdlet names in your scripts while you transition to the new cmdlets.

Version history

For best results, use the latest version of the Microsoft.PowerShell.PSResourceGet module.

  • Microsoft.PowerShell.PSResourceGet 1.0.6 - released to the PowerShell Gallery on 10-Oct-2024

  • Microsoft.PowerShell.PSResourceGet 1.0.5 - shipped in PowerShell 7.5-preview.3

  • Microsoft.PowerShell.PSResourceGet 1.0.4.1 - shipped in PowerShell 7.4.2

  • Microsoft.PowerShell.PSResourceGet 1.0.2 - released to the PowerShell Gallery on 06-Feb-2024

  • PowerShell 7.4.0 ships with Microsoft.PowerShell.PSResourceGet 1.0.1, PowerShellGet 2.2.5, and PackageManagement 1.4.8.1

  • PowerShell 7.0.4, PowerShell 7.1.1, and higher shipped with PowerShellGet 2.2.5 and PackageManagement 1.4.7.

  • PowerShell 7.0.0 shipped with PowerShellGet 2.2.3 and PackageManagement 1.4.6.

  • PowerShell 6.0.0 shipped with PowerShellGet 1.6.0 and PackageManagement 1.1.7.

  • Windows PowerShell 5.1 comes with version 1.0.0.1 of PowerShellGet and PackageManagement preinstalled.

    Important

    The 1.0.0.1 version of PowerShellGet has limited features and must be updated to work properly with the PowerShell Gallery. To be supported, you must update to the latest version. For upgrade instructions, see Update PowerShellGet for Windows PowerShell 5.1.

See also