---
title: "PowerShellGet to PSResourceGet: Install Modules Faster"
description: "Replace Install-Module with PSResourceGet to install PowerShell modules concurrently, pin versions with NuGet ranges, and cut provisioning time."
canonical: "https://adamtheautomator.com/psresourceget-install-modules/"
---

# PowerShellGet to PSResourceGet: Install Modules Faster

> Replace Install-Module with PSResourceGet to install PowerShell modules concurrently, pin versions with NuGet ranges, and cut provisioning time.

Source: https://adamtheautomator.com/psresourceget-install-modules/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![PowerShellGet to PSResourceGet: Install Modules Faster](https://adamtheautomator.com/wp-content/uploads/publisher/4165d9c85b2b81669c6ef89a7b055965/0520d3c4fd23053d58c563d64b5fe799aebfe4d16cafdbc18a7ffea2bc64d8f4.webp)

# PowerShellGet to PSResourceGet: Install Modules Faster

[![](https://secure.gravatar.com/avatar/d0b9d42e21e5622713f8b693aa5c0f9244d5f7dd200ed29b8398f52dee5de337?s=192&d=mm&r=g)Adam Bertram](https://adamtheautomator.com/author/adam-bertram/)16 November 20267 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[PowerShell](/tag/powershell/)[Automation](/tag/automation/)[DevOps](/tag/devops/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Why PSResourceGet Exists](#why-psresourceget-exists)
*   [Installing PSResourceGet](#installing-psresourceget)
*   [Check Your PowerShell Version](#check-your-powershell-version)
*   [On PowerShell 7.4+](#on-powershell-74)
*   [On Windows PowerShell 5.1](#on-windows-powershell-51)
*   [Basic Module Operations](#basic-module-operations)
*   [Install a Module](#install-a-module)
*   [Find Available Modules](#find-available-modules)
*   [List Installed Modules](#list-installed-modules)
*   [Uninstall a Module](#uninstall-a-module)
*   [NuGet Version Pinning](#nuget-version-pinning)
*   [Install Multiple Modules Concurrently](#install-multiple-modules-concurrently)
*   [Microsoft Artifact Registry as a Trusted Source](#microsoft-artifact-registry-as-a-trusted-source)
*   [Migration and Compatibility](#migration-and-compatibility)
*   [Convert an Existing Install-Module Line](#convert-an-existing-install-module-line)
*   [Command Mapping](#command-mapping)
*   [When to Migrate](#when-to-migrate)
*   [Convert Your First Build Script](#convert-your-first-build-script)

How long does it take to provision a fresh PowerShell environment with 15 modules? If you’re using the legacy [`Install-Module` cmdlet](https://learn.microsoft.com/powershell/module/powershellget/install-module), are you counting that wait in minutes while each module downloads one after another? And when a build agent stalls on a NuGet provider prompt, do you know which layer to blame?

By the end of this tutorial, you’ll have [PSResourceGet](https://learn.microsoft.com/powershell/gallery/powershellget/overview) installed and tested with a timed multi-module run. On PowerShell 7.7 or Windows PowerShell 5.1 (which installs PSResourceGet 1.3.1), you’ll see concurrent downloads in action.

## Prerequisites

If you want to follow along hands-on, you’ll need:

*   **PowerShell 7.4 or later** (`PSResourceGet` is pre-installed) **OR** Windows PowerShell 5.1 with a `PowerShellGet` newer than the built-in 1.0.0.1 (check with `Get-Module -Name PowerShellGet -ListAvailable`, and follow Microsoft’s [PowerShellGet update steps](https://learn.microsoft.com/powershell/gallery/powershellget/install-powershellget) if 1.0.0.1 is all you see)
    
*   **TLS 1.2** on Windows PowerShell 5.1, because the PowerShell Gallery [no longer accepts TLS 1.0 or 1.1](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/). The 5.1 install steps below include the one-line fix
    
*   **Execution policy** on Windows PowerShell 5.1 clients that runs local scripts (`Set-ExecutionPolicy RemoteSigned -Scope CurrentUser`), because the default [Restricted policy blocks PowerShell profiles](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies), and the 5.1 steps persist the TLS fix in `$PROFILE`
    
*   **Internet access** to the [PowerShell Gallery](https://www.powershellgallery.com/) or Microsoft Artifact Registry
    

This tutorial was tested on PowerShell 7.5.2 (Microsoft.PowerShell.PSResourceGet 1.1.1), PowerShell 7.7.0 (PSResourceGet 1.3.1), and Windows PowerShell 5.1 (bootstrapped to PSResourceGet 1.3.1).

## Why PSResourceGet Exists

`PowerShellGet` v2 sends every install through the [`PackageManagement` module](https://learn.microsoft.com/powershell/module/packagemanagement), so a bug in that layer becomes a bug in your build script. According to Microsoft’s [PSResourceGet general availability announcement](https://devblogs.microsoft.com/powershell/psresourceget-is-generally-available/), this dependency “caused compatibility issues and bugs that were difficult to resolve.” Microsoft rebuilt the package manager in C# without that layer, which changes what you’ll touch in this tutorial:

*   Installs download concurrently instead of one module at a time (requires PSResourceGet 1.3.0 or later, which ships with PowerShell 7.7; on Windows PowerShell 5.1, the bootstrap install delivers 1.3.1).
    
*   One `-Version` parameter takes NuGet range notation in place of `-MinimumVersion`, `-MaximumVersion`, and `-RequiredVersion`.
    
*   Windows PowerShell 5.1 sessions stop cycling through NuGet provider upgrade prompts.
    

On PSResourceGet 1.3.0+, concurrency is the change you can measure, as the side-by-side run below shows.

![Sequential vs concurrent](https://adamtheautomator.com/wp-content/uploads/publisher/80c52eaf5f54c0d2c7950523de35357dc259f68df67020db27ff853f604344bc.jpg)

## Installing PSResourceGet

The installation path depends on your PowerShell version. [PowerShell 7.4](https://learn.microsoft.com/powershell/scripting/whats-new/what-s-new-in-powershell-74) and later include `PSResourceGet` by default. Windows PowerShell 5.1 requires manual bootstrapping.

### Check Your PowerShell Version

Verify which PowerShell you’re running:

```powershell
$PSVersionTable.PSVersion
```

If `$PSVersionTable.PSVersion` reports 7.4 or higher, follow the PowerShell 7.4+ steps below. If it reports 5.1, follow the Windows PowerShell 5.1 steps. On a PowerShell 7.5.2 session, the output looks like the screenshot below.

![PowerShell version 7.5.2](https://adamtheautomator.com/wp-content/uploads/publisher/4e56e949135b1a1f9ece6f18f9e80d249322e7fa954d24d83daddd716e236532.jpg)

### On PowerShell 7.4+

If you’re on PowerShell 7.4 or later, `PSResourceGet` is already installed. Confirm it:

```powershell
Get-Module -Name Microsoft.PowerShell.PSResourceGet -ListAvailable
```

The output shows version 1.0 or later.

### On Windows PowerShell 5.1

On Windows PowerShell 5.1, you must bootstrap `PSResourceGet` manually. First, force TLS 1.2:

```powershell
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
```

Then install `PSResourceGet` using the legacy `Install-Module`:

```powershell
Install-Module -Name Microsoft.PowerShell.PSResourceGet -Force -AllowClobber
Import-Module Microsoft.PowerShell.PSResourceGet
```

`-Force` overrides installation-conflict warnings and allows a side-by-side install if another version already exists, and `-AllowClobber` overwrites existing commands that share a name with the module’s cmdlets. Verify the installation:

```powershell
Get-Module -Name Microsoft.PowerShell.PSResourceGet -ListAvailable
```

If the `Install-Module` command above fails with a connection error, the system is using TLS 1.0. Add the TLS 1.2 line to your PowerShell profile (`$PROFILE`) so it persists across sessions.

* * *

_**Pro Tip: For the `$PROFILE` copy, use the form from Microsoft’s install guide, `[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12`. It keeps the protocols the session already allows and adds TLS 1.2 to them, so loading the same profile leaves other scripts’ existing connections intact.**_

* * *

## Basic Module Operations

`PSResourceGet` provides cmdlets for finding, installing, listing, and removing modules, and each one uses the same `PSResource` noun whether the package is a module or a script.

PSResourceGet 1.3.0 and later (the version installed on Windows PowerShell 5.1 by the bootstrap steps above, and the version shipped with PowerShell 7.7) register `MicrosoftArtifactRegistry` (MAR) by default at priority 40, ahead of PSGallery at priority 50. For Microsoft’s own modules like Az.Accounts, `Install-PSResource` checks MAR first. For third-party modules like Pester, it checks MAR first too, which fails with a “Not Found” error before falling back to the PowerShell Gallery. Under `$ErrorActionPreference = 'Stop'` (common in build scripts), that fallback never runs and the install aborts. The `-Repository PSGallery` parameter bypasses the MAR check and installs from the Gallery directly. The examples below use it on every command that installs or searches for modules, because all three completed with no error on a fresh PowerShell 7.7.0 environment.

### Install a Module

The [`Install-PSResource`](https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/install-psresource) cmdlet replaces `Install-Module`. Basic syntax:

```powershell
Install-PSResource -Name Az.Accounts -Repository PSGallery
```

`Install-PSResource -Name Az.Accounts -Repository PSGallery` installs the latest stable version of Az.Accounts. By default, `Install-PSResource` uses the `CurrentUser` scope, so on PowerShell 7 for Windows the module lands in `$home\Documents\PowerShell\Modules` and needs no elevation.

To install a specific version:

```powershell
Install-PSResource -Name Az.Accounts -Version '2.12.0'
```

Unlike `PowerShellGet`, the bare version string `'2.12.0'` means exactly version 2.12.0, not “2.12.0 or higher.”

### Find Available Modules

Search the PowerShell Gallery before installing with [`Find-PSResource`](https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/find-psresource). For example, to search for the [Pester](https://pester.dev/) testing framework:

```powershell
Find-PSResource -Name Pester
```

The output shows the latest version. Add `-Version '*'` to list every version available:

```powershell
Find-PSResource -Name Pester -Version '*' -Repository PSGallery
```

Use `-Version` with a range to filter:

```powershell
Find-PSResource -Name Pester -Version '[5.0.0, 5.5.0]' -Repository PSGallery
```

The `'[5.0.0, 5.5.0]'` range returns only Pester versions between 5.0.0 and 5.5.0 (inclusive).

### List Installed Modules

Check what’s already on your system with [`Get-InstalledPSResource`](https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/get-installedpsresource):

```powershell
Get-InstalledPSResource
```

Filter by name:

```powershell
Get-InstalledPSResource -Name Az.Accounts
```

The output includes version and repository. To see the installation path, add `Select-Object`:

```powershell
Get-InstalledPSResource -Name Az.Accounts | Select-Object Name, Version, Repository, InstalledLocation
```

### Uninstall a Module

Remove a module with [`Uninstall-PSResource`](https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/uninstall-psresource):

```powershell
Uninstall-PSResource -Name Az.Accounts -Version '2.12.0'
```

Without `-Version`, the cmdlet removes all installed versions of the module. Before you run uninstall commands in automation, you’ll need version pinning that makes those removals deterministic.

## NuGet Version Pinning

Microsoft Learn’s [Install-PSResource documentation](https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/install-psresource?view=powershellget-3.x) states: “The Version parameter accepts a NuGet version range.”

| Syntax | Meaning |
| --- | --- |
| `'2.12.0'` | Exactly version 2.12.0 |
| `'[2.12.0, ]'` | Version 2.12.0 or higher (minimum inclusive) |
| `'[2.0.0, 3.0.0)'` | Version 2.0.0 or higher, but less than 3.0.0 (exclusive upper bound) |
| `'[2.0.0, 3.0.0]'` | Version 2.0.0 through 3.0.0 (both bounds inclusive) |

* * *

_**Warning: Porting `Install-Module -MinimumVersion 2.12.0` to `Install-PSResource -Version '2.12.0'` stops newer releases and installs exactly 2.12.0 with no error. Write `'[2.12.0, ]'` to keep the minimum-version behavior.**_

* * *

To install within a version range:

```powershell
Install-PSResource -Name Pester -Version '[5.0.0, 6.0.0)' -Repository PSGallery
```

The `'[5.0.0, 6.0.0)'` range installs Pester 5.0.0 or higher, but excludes 6.0.0 and higher. Always confirm the installed version with `Get-InstalledPSResource` to verify the expected version landed. For 15 pinned modules on a build agent, read the ranges from a file you commit alongside the pipeline.

## Install Multiple Modules Concurrently

The [`-RequiredResourceFile`](https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/install-psresource#-requiredresourcefile) parameter accepts a JSON manifest listing all dependencies. Create a `dependencies.json` file:

```json
{
  "Az.Accounts": {
    "version": "[2.12.0]",
    "repository": "PSGallery"
  },
  "Pester": {
    "version": "[5.0.0, 5.5.0]",
    "repository": "PSGallery"
  },
  "Microsoft.Graph": {
    "version": "[2.41.0, 3.0.0)",
    "repository": "PSGallery"
  }
}
```

The `"repository": "PSGallery"` entry on each module keeps PSResourceGet 1.3.x from checking the default MAR entry first, which would fail for third-party modules.

Install all three modules concurrently, and time the run so you have a number to compare. Run it on a system that doesn’t have these modules yet:

```powershell
Measure-Command { Install-PSResource -RequiredResourceFile dependencies.json -TrustRepository }
```

`Measure-Command` returns a TimeSpan, so read `TotalSeconds` for the elapsed time. Run the same three modules through `Install-Module` on a second clean machine for your baseline, then confirm the pinned versions landed with `Get-InstalledPSResource -Name Az.Accounts, Pester, Microsoft.Graph`. Those pinned versions come from whichever repository you’ve configured as your source.

## Microsoft Artifact Registry as a Trusted Source

The [Microsoft Artifact Registry](https://learn.microsoft.com/powershell/gallery/powershellget/psresourceget-release-notes#added-support-for-microsoft-artifact-registry) (MAR) is the official source for first-party Microsoft modules.

Register MAR as a repository with [`Register-PSResourceRepository`](https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/register-psresourcerepository):

```powershell
Register-PSResourceRepository -Name MAR -Uri https://mcr.microsoft.com/ -Trusted
```

PSResourceGet 1.3.0 and later register MAR by default as `MicrosoftArtifactRegistry` (priority 40, trusted), so on those versions the command above creates a second MAR entry. To re-register the default entry if you removed it, use `Register-PSResourceRepository -MicrosoftArtifactRegistry`.

The `-Trusted` flag suppresses the untrusted-source confirmation prompt when installing from MAR. Set MAR’s priority higher than the PowerShell Gallery with [`Set-PSResourceRepository`](https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/set-psresourcerepository):

```powershell
Set-PSResourceRepository -Name MAR -Priority 10
Set-PSResourceRepository -Name PSGallery -Priority 50
```

[Lower priority values take precedence](https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/install-psresource#-repository), so `Install-PSResource` searches MAR before the PowerShell Gallery and installs the first match it finds. That ordering decides where Microsoft’s own modules come from. MAR only carries first-party Microsoft modules, so `Install-PSResource -Name Pester` still falls through to the PowerShell Gallery and inherits the Gallery’s trust model.

* * *

_**Warning: With MAR ahead of PSGallery, installing a third-party module like Pester prints a red “Not Found” error from MAR before installing from the Gallery. Under `$ErrorActionPreference = 'Stop'` (common in build scripts), the install aborts. Add `-Repository PSGallery` to bypass MAR for third-party modules: `Install-PSResource -Name Pester -Repository PSGallery`.**_

* * *

## Migration and Compatibility

Microsoft publishes a [direct command mapping](https://learn.microsoft.com/powershell/gallery/powershellget/overview#command-differences) from the old cmdlets to the new ones, but the parameter names changed, so the first job is converting the lines your scripts actually run.

### Convert an Existing Install-Module Line

Here’s a typical build-script line that pins a version and suppresses prompts:

```powershell
Install-Module -Name Pester -RequiredVersion 5.5.0 -Scope CurrentUser -Force -AllowClobber
```

Renaming the cmdlet alone fails, because `Install-PSResource` has no `-RequiredVersion`, `-Force`, or `-AllowClobber` parameter. The equivalent line is:

```powershell
Install-PSResource -Name Pester -Version '5.5.0' -Scope CurrentUser -TrustRepository -Repository PSGallery
```

*   `-Version '5.5.0'` replaces `-RequiredVersion`, because a bare version string is an exact pin.
    
*   `-TrustRepository` suppresses the untrusted-repository prompt that `-Force` used to push past.
    
*   `-AllowClobber` has no replacement because `Install-PSResource` overwrites same-named commands unless you add `-NoClobber`.
    
*   `-Repository PSGallery` keeps MAR (MicrosoftArtifactRegistry) from checking first under `$ErrorActionPreference = 'Stop'`, which would abort the install when Pester is not found on MAR.
    

### Command Mapping

| Legacy Command | New Command | Notes |
| --- | --- | --- |
| `Install-Module` | `Install-PSResource` | Concurrent downloads, NuGet version ranges |
| `Find-Module` | `Find-PSResource` | Same search behavior |
| `Get-InstalledModule` | `Get-InstalledPSResource` | Lists installed modules and scripts |
| `Update-Module` | `Update-PSResource` | Updates to the latest version within constraints |
| `Uninstall-Module` | `Uninstall-PSResource` | Removes the module |
| `Register-PSRepository` | `Register-PSResourceRepository` | Adds custom repositories |
| `Set-PSRepository` | `Set-PSResourceRepository` | Adjusts priority and trust flags |

### When to Migrate

Move a script to native `Install-PSResource` syntax when:

*   It runs in a CI/CD pipeline or provisions modules across several servers and you need reproducible builds with NuGet version ranges or a `dependencies.json` manifest.
    
*   You’re on Windows PowerShell 5.1 and still fighting `PackageManagement` provider prompts.
    
*   You’re on PowerShell 7.7 or later (or 5.1 with PSResourceGet 1.3.1) and want concurrent downloads, which only the native `Install-PSResource` provides.
    

PowerShell 7.4 and 7.5 ship with PSResourceGet 1.1.1 and PowerShell 7.6 ships with 1.2.x, and neither supports concurrent downloads. On 1.1.1, the three-module install measured 67.5 s against 67.8 s for `Install-Module`, so defer migration if you have hundreds of scripts to convert and no immediate need for NuGet ranges or concurrency.

## Convert Your First Build Script

Start with the script that rebuilds your build agent. Convert its `Install-Module` lines, move the versions into a [`dependencies.json` required resource file](https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/install-psresource#-requiredresourcefile) with NuGet ranges, and time `Install-PSResource -RequiredResourceFile dependencies.json` against the old run. If the timing holds up, verify the pinned versions with `Get-InstalledPSResource`.

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fpsresourceget-install-modules%2F&text=PowerShellGet%20to%20PSResourceGet%3A%20Install%20Modules%20Faster)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fpsresourceget-install-modules%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fpsresourceget-install-modules%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/publisher/2e05d9c85b2b81feb24af1f04a889143/3eab14af9dabf46fbd333914ce6ccf46f84117d2394d3e7218c186cd249bb7e2.webp)

### [PowerShell or Power Automate: Stop Automation Mistakes](/powershell-vs-power-automate/)

Score six factors to choose between PowerShell and Power Automate: target system, complexity, data volume, team skills, cost, governance.

![](https://adamtheautomator.com/wp-content/uploads/2026/06/26989-monitor-windows-servers-prometheus-grafana-codex.webp)

### [How to Monitor Windows Servers with Prometheus and Grafana](/monitor-windows-servers-prometheus-grafana/)

Set up Windows Server monitoring with windows\_exporter, Prometheus, Grafana, and Alertmanager. Learn how to secure port 9182, scrape targets, and validate alerts.

![](https://adamtheautomator.com/wp-content/uploads/publisher/4065d9c85b2b8191a472c3296ef0d282/e680d5ac1f0cde066996077d926999a4adf6d582b7266d915c0d1cdc3e77f938.webp)

### [Why Sysadmins Must Pivot to AI Agent Orchestration](/sysadmin-ai-agent-orchestration/)

Learn how sysadmins can govern AI agents with scoped identities, policy gates, approvals, telemetry, and rollback while building an orchestration career.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
