Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Meta Package Manager works fine, but is maintained by only one person 😶‍🌫️.
You can help if you purchase business support 🤝 or sponsor the project 🫶.
Meta Package Manager
Light Logo Dark Logo
  • Installation
  • Package managers
    • Antidote
    • Zsh Antigen
    • Alpine apk
    • Atom apm
    • Debian apt
    • apt-cyg
    • Linux Mint apt
    • asdf
    • Homebrew Formulae
    • Rust cargo
    • Homebrew Cask
    • cave
    • Chocolatey
    • Chromebrew
    • PHP Composer
    • Conda
    • Perl CPAN
    • deb-get
    • devkitPro pacman
    • Fedora DNF
    • Fedora DNF5
    • Gentoo emerge
    • Solus eopkg
    • Fink
    • Fish fisher
    • Flatpak
    • Linux fwupd
    • RubyGems
    • GitHub CLI extensions
    • GNU Guix
    • kubectl krew
    • Neovim lazy-nvim
    • MacPorts
    • Mac App Store
    • mise
    • Nix
    • Node npm
    • Fish Oh My Fish
    • OCaml opam
    • opkg
    • Arch Linux pacaur
    • Arch Linux pacman
    • Pacstall
    • Arch Linux paru
    • Arch Linux pikaur
    • Python pip
    • Python pipx
    • PackageKit
    • FreeBSD pkg
    • OpenBSD pkg tools
    • Pkgin
    • Node pnpm
    • FreeBSD Ports Collection
    • PowerShell Gallery
    • Scoop
    • SDKMAN
    • Scoop sfsu
    • Sheldon
    • slapt-get
    • Snap
    • Soar
    • Sorcery
    • Valve SteamCMD
    • stew
    • Solaris SVR4 package tools
    • Clear Linux Software Updater
    • TazPkg
    • TeX Live Manager
    • Topgrade
    • Arch Linux trizen
    • urpmi
    • Python uv
    • Python uvx
    • Neovim vim-pack
    • Volta
    • Visual Studio Code
    • VSCodium
    • WinGet
    • Void XBPS
    • Yarn Classic
    • Yarn Berry
    • Arch Linux yay
    • Fedora YUM
    • zerobrew
    • Zsh Zim
    • Zinit
    • Zsh zplug
    • openSUSE Zypper
  • Manager augmentations
  • Cross-manager operations
  • JSON & CSV exports
  • Snapshot and export
  • SBOM: Software Bill of Materials
  • CLI parameters
  • Configuration
  • Per-manager overrides
  • Cooldown
  • Privilege escalation and sudo
  • Security model
  • Xbar and SwiftBar plugin
  • GNOME Shell extension
  • Benchmark
  • Unsupported managers
  • Falsehoods programmers believe about package managers

Development

  • Contribution guide
  • Add a new package manager
  • Add a packaging channel
  • API
    • meta_package_manager.managers package
    • meta_package_manager.sbom package
  • tests package
  • Downstream packaging
  • Binaries
  • Infrastructure
  • Releasing
  • Index
  • Module Index
  • Changelog
  • History
  • Todo-list
  • Code of conduct
  • Legal notices
  • GitHub repository
  • Funding
Back to top
View this page
Edit this page

PowerShell Gallery¶

ID

pwsh-gallery

Home page

https://www.powershellgallery.com

Version requirement

>= 7.4

Platforms

🐧 Linux · 🍎 macOS · 🪟 Windows

Operations

installed · outdated · search · install · upgrade · upgrade_all · remove

purl types

pkg:pwsh-gallery

CLI name

pwsh

Every call

pwsh -NoProfile -NonInteractive -Command <command>

Issues and PRs

📦 manager: pwsh-gallery

Source

meta_package_manager/managers/pwsh_gallery.py

PowerShell Gallery client, driven through the modern Microsoft.PowerShell.PSResourceGet module.

Note

Every operation is one PowerShell expression, run non-interactively with no user profile loaded. Reads emit ConvertTo-Json -AsArray and are parsed as JSON; outdated has no native cmdlet, so its installed-versus-gallery comparison runs inside that single pwsh call rather than as one round trip per installed module.

Note

Only pwsh (PowerShell 7+) is supported. Legacy Windows PowerShell 5.1 is intentionally excluded: it ships PowerShellGet v2, which depends on the NuGet provider and prompts to trust PSGallery on first install. PSResourceGet ships bundled with pwsh 7.4+ and supersedes the v2 cmdlets with cleaner, JSON-friendly objects.

Caution

All install and search operations target -Scope CurrentUser so that mpm does not require elevation. upgrade and remove are scope- agnostic and operate on whichever scope holds each module.

Caution

Install-PSResource is invoked with -TrustRepository so the confirmation prompt on the default PSGallery repository is bypassed. Only the default repository is consulted: third-party PSRepository registrations are out of scope.

What mpm adds to pwsh-gallery¶

Through mpm, pwsh-gallery gains --extended search, to match against package descriptions.

Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover pwsh-gallery alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.

Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.

Your pwsh-gallery commands, in mpm¶

You already know pwsh-gallery: each operation maps one-to-one onto mpm, in an interface shared by every manager.

To…

With pwsh-gallery

With mpm

List what’s installed

pwsh "Get-InstalledPSResource

mpm --pwsh-gallery installed

List outdated packages

pwsh "Get-InstalledPSResource

mpm --pwsh-gallery outdated

Search for a package

pwsh "Find-PSResource -Name '*readline*'

mpm --pwsh-gallery search <pkg>

Install a package

pwsh "Install-PSResource -Name 'PSReadLine' -Scope CurrentUser -TrustRepository -AcceptLicense"

mpm install pkg:pwsh-gallery/<pkg>

Upgrade one package

pwsh "Update-PSResource -Name 'PSReadLine' -TrustRepository -AcceptLicense"

mpm --pwsh-gallery upgrade PSReadLine

Upgrade everything

pwsh "Update-PSResource -TrustRepository -AcceptLicense"

mpm --pwsh-gallery upgrade --all

Remove a package

pwsh "Uninstall-PSResource -Name 'PSReadLine'"

mpm remove pkg:pwsh-gallery/PSReadLine

Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.

Operations¶

Operation

Supported

Notes

installed

✓

outdated

✓

orphans

search

✓

extended search backfilled by mpm

install

✓

upgrade

✓

upgrade_all

✓

remove

✓

sync

cleanup

doctor

Selecting and configuring pwsh-gallery¶

Deselect pwsh-gallery for a single run with --no-pwsh-gallery, or persist the choice in your configuration:

[mpm]
pwsh-gallery = false

The arguments and environment variables listed in the box atop this page are forced on every pwsh-gallery call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.

Keep it enabled but tune how mpm drives it with a per-manager override:

[mpm.managers.pwsh-gallery]
timeout = 900

mpm config-template pwsh-gallery prints every overridable attribute as a ready-to-paste block.

Recipes¶

A few jobs you would otherwise script around pwsh-gallery, one mpm command each:

  • Snapshot and clone a machine: mpm --pwsh-gallery dump pwsh-gallery.toml, then mpm restore pwsh-gallery.toml on the next one.

  • Export a compliance SBOM: mpm --pwsh-gallery sbom (CycloneDX by default, --spdx for SPDX).

Privilege escalation¶

mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.

See privilege escalation for the full policy.

Cooldown¶

State of PowerShell Gallery’s release-age gating, from the cooldown support table:

Status: ❌ None

A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:

  • Registry: PowerShell Gallery

  • Retraction: Yank under another name: the Gallery “does not support permanent deletion of packages”; an unlisted version leaves search and listings but “remains downloadable by specifying its exact version” (docs)

With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --allow-unsupported-managers opts back in.

Version probe¶

The version is probed by running:

$ pwsh --version
PowerShell 7.4.6

and extracted with:

r"PowerShell\s+(?P<version>\S+)"

Reference traces¶

Raw native outputs captured in the manager source: the reference mpm’s parsers were written against. If you know PowerShell Gallery well and a transcript below looks wrong, or a newer release changed its output format, report it.

$ pwsh -NoProfile -NonInteractive -Command \
    "Get-InstalledPSResource | \
     Select-Object Name, @{n='Version';e={$_.Version.ToString()}} | \
     ConvertTo-Json -AsArray -Depth 2 -Compress"
[{"Name":"PSReadLine","Version":"2.3.6"},
 {"Name":"Pester","Version":"5.5.0"}]
$ pwsh -NoProfile -NonInteractive -Command \
    "Get-InstalledPSResource | ForEach-Object { ... } | \
     ConvertTo-Json -AsArray -Depth 2 -Compress"
[{"Name":"PSReadLine","Installed":"2.3.4","Latest":"2.3.6"}]

Feed any of these through mpm and the raw output becomes one uniform table, the same shape for every manager: filter it, project columns, or export it (mpm --pwsh-gallery installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.

Changelog¶

  • 6.5.0 (2026-05-25)

    • Add PowerShell Gallery package manager with installed, outdated, search, install, upgrade, and remove support. Drives Microsoft.PowerShell.PSResourceGet (PowerShell 7.4+), installs to -Scope CurrentUser, cross-platform on Linux, macOS, and Windows. Closes #1760.

Next
Scoop
Previous
FreeBSD Ports Collection
Copyright © Kevin Deldycke and contributors
Made with Furo
Last updated on 2026-08-12
On this page
  • PowerShell Gallery
    • What mpm adds to pwsh-gallery
    • Your pwsh-gallery commands, in mpm
    • Operations
    • Selecting and configuring pwsh-gallery
    • Recipes
    • Privilege escalation
    • Cooldown
    • Version probe
    • Reference traces
    • Changelog