About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
The warning "WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'" followed by "PackageManagement\Install-Package: No match was found for the specified search criteria and module name" appears in Microsoft's Azure Attestation troubleshooting guide, under installing the Az and Az.Attestation modules. That guide says the Gallery "has deprecated Transport Layer Security (TLS) versions 1.0 and 1.1" and tells you to turn TLS 1.2 on in the session first. Microsoft's separate page "Install a package manager for PowerShell" adds that Windows PowerShell 5.1 needs a newer PowerShellGet and PackageManagement.
Check the TLS setting and the installed versions, which only read. The two fixes change a session setting and install modules, so each is given with a way back.
What the error means
The message appears in Microsoft's Azure Attestation troubleshooting guide (page dated 2025-04-15) under "Az.Attestation installation issues in PowerShell", for someone "Unable to install the Az PowerShell module or Az.Attestation PowerShell module in PowerShell." The guide's steps: "PowerShell Gallery has deprecated Transport Layer Security (TLS) versions 1.0 and 1.1. TLS 1.2 or a later version is recommended." It tells you to run [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 before the Install-Module commands.
Microsoft's "Install a package manager for PowerShell" page (dated 2026-01-27) is firmer and gives the form that adds TLS 1.2 without dropping other protocols: "To access the PowerShell Gallery, you must use Transport Layer Security (TLS) 1.2 or higher." It also says that Windows PowerShell ships with version 1.0.0.1 of PowerShellGet and PackageManagement, that if you run Windows PowerShell 5.1 "you must upgrade to the latest version of PowerShellGet and PackageManagement", and that "All versions of PowerShellGet v1.x are no longer supported."
The Install-Module page says the cmdlet gets one or more modules from an online repository, and that Get-PSRepository displays the registered repositories. The Install-Module syntax includes -Proxy and -ProxyCredential. Microsoft's pages do not tie those parameters to this warning.
Two package tools can be involved, so know which one you are using. Microsoft says PowerShell 7.4 or later also has Microsoft.PowerShell.PSResourceGet installed side by side with PowerShellGet and PackageManagement, and describes it as "the new package management solution for PowerShell". The Install-Module cmdlet in the title belongs to PowerShellGet. A server that still runs Windows PowerShell 5.1 uses the older tools unless someone has updated them.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| The session does not use TLS 1.2 or higher | The warning and "No match was found" on every module | [Net.ServicePointManager]::SecurityProtocol does not list Tls12 |
| Windows PowerShell 5.1 still has PowerShellGet 1.0.0.1 | The same errors, or a prompt for the NuGet provider | Get-Module -ListAvailable shows version 1.0.0.1 |
Prove the cause before changing anything
All of these only read. Run them in the PowerShell window that shows the error:
$PSVersionTable
[Net.ServicePointManager]::SecurityProtocol
$Names = @('PowerShellGet', 'PackageManagement', 'Microsoft.PowerShell.PSResourceGet')
Get-Module -Name $Names -ListAvailable
Get-PSRepository
The $Names and Get-Module lines are the check Microsoft gives for installed versions. On a newly installed Windows system, Microsoft shows Windows PowerShell 5.1 returning PackageManagement 1.0.0.1 and PowerShellGet 1.0.0.1. If the version of PowerShellGet is newer than 1.0.0.1, Microsoft says you can check for updates and install the latest release. On PowerShell 6 or later, the page says a newer PowerShellGet and PackageManagement are already installed, and PowerShell 7.4 or later also has Microsoft.PowerShell.PSResourceGet.
Example (illustrative): at contoso.com.au an administrator on rds01 runs Install-Module -Name Az -Repository PSGallery in Windows PowerShell 5.1 and gets the warning. Get-Module -Name $Names -ListAvailable shows PowerShellGet 1.0.0.1 and PackageManagement 1.0.0.1, and the TLS value does not include Tls12. Both causes in the first two rows of the table apply, so the TLS fix comes first, then the update.
Fix
Turn TLS 1.2 on in this session
Before you change it, record the current value:
[Net.ServicePointManager]::SecurityProtocol
Risk: the next command changes the TLS protocols this PowerShell session uses for its own web requests. It lasts until you close the window.
Microsoft's PowerShellGet page gives the form that adds TLS 1.2 to what the session already uses:
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
The first command on Microsoft's Azure Attestation page assigns Tls12 alone, so the session's protocol list becomes only Tls12. The PowerShellGet page's -bor form adds Tls12 to the protocols the session already has. Either lets the Gallery connection use TLS 1.2. Then run the Install-Module command again. To undo it, close the PowerShell window; the setting is not saved anywhere else. Microsoft's page also says you can add the command to your PowerShell profile so TLS 1.2 is configured for every session. That is a permanent change to the profile, so it needs its own record of the profile's earlier content, and it is not part of this fix.
Update PowerShellGet and PackageManagement (Windows PowerShell 5.1)
If the version check showed 1.0.0.1, Microsoft's steps are: check what the Gallery offers, accept the NuGet provider, then install the newer modules.
Before you change it, record the installed versions:
Get-Module -Name PowerShellGet, PackageManagement -ListAvailable
Disruptive step: the next two commands can install the NuGet provider and the nuget.exe command-line tool if you answer Y to the prompt, and then install a newer PowerShellGet, which installs the latest PackageManagement with it. They change the module set for PowerShell sessions on the computer that use PowerShellGet.
Microsoft's first command checks what the Gallery offers. On a computer still at version 1.0.0.1, Find-Module prompts "NuGet provider is required to continue", and Microsoft says that answering Y makes PowerShellGet install the provider and nuget.exe if necessary:
$Names = @('PowerShellGet', 'PackageManagement', 'Microsoft.PowerShell.PSResourceGet')
Find-Module -Name $Names -Repository PSGallery
Then run Microsoft's install command:
Install-Module PowerShellGet -Repository PSGallery -Force -AllowClobber
The Install-Module page says -Force and -AllowClobber override warnings about modules with the same name or version, or commands that already exist in another module. Open a new PowerShell window afterwards and run the version check again.
To undo it, remove the newer module versions you installed. The Uninstall-Module page says you cannot uninstall a module if other modules depend on it, so remove PowerShellGet first, then PackageManagement. Microsoft's pages do not say whether removing a module that is loaded in the current session succeeds, so run these in a new PowerShell window:
Uninstall-Module -Name PowerShellGet -RequiredVersion <version-you-installed>
Uninstall-Module -Name PackageManagement -RequiredVersion <version-you-installed>
Use the version numbers from the recorded list and the new list. There is no way back from the NuGet provider and nuget.exe installation in Microsoft's pages, which give no uninstall step for either.
Install the module you wanted
Before you change it, record what is installed now:
Get-InstalledModule
Risk: the next command downloads a module from the PowerShell Gallery and installs it. Microsoft says some Gallery packages are authored by Microsoft and others by the community, so install only a module you have chosen to trust. -Scope CurrentUser limits the install to your account.
Install-Module -Name <module-name> -Scope CurrentUser -Repository PSGallery
To undo it, first run Get-InstalledModule again and compare it with the list you recorded. For each module that is new in the list, which can include modules installed along with the one you named, run:
Uninstall-Module -Name <new-module-name>
If an older version of the module was already in your recorded list, remove only the version you just installed, so the one you had stays:
Uninstall-Module -Name <module-name> -RequiredVersion <version-you-installed>
Confirm the fix
Install-Modulefinishes without the "Unable to resolve package source" warning.Get-InstalledModule -Name <module-name>lists the module and its version.Get-Module -Name PowerShellGet, PackageManagement -ListAvailableshows versions newer than 1.0.0.1 if you ran the update.- If the warning is still there with TLS 1.2 on and current PowerShellGet, the cause is outside what Microsoft's pages describe. Take the exact warning, the TLS value and the module versions to the owner of the network path to the Gallery.
What to watch afterwards
- A new window. The TLS setting does not carry over, so a script that installs modules needs the TLS line each time, or the profile change Microsoft describes.
- The same message on another server with the older module versions.
- Microsoft's note that the Microsoft.PowerShell.PSResourceGet module "replaces the PowerShellGet and PackageManagement modules". Microsoft's pages describe it but give no migration steps for existing scripts.
Read next
Related articles you may want next.
- TroubleshootingPowerShell "running scripts is disabled on this system": find which execution policy is blocking the scriptPowerShell says running scripts is disabled on this system. List the execution policy in every scope, then change the narrowest scope with a way back.Read article
- TroubleshootingMicrosoft Graph PowerShell "Authorization_RequestDenied. Insufficient privileges to complete the operation."Microsoft Graph PowerShell returns Authorization_RequestDenied. Compare Get-MgContext scopes with Find-MgGraphCommand, then add the missing scope.Read article
- TroubleshootingTLS handshake failure: no shared protocol or cipher, read the s_client error and the Schannel eventsslv3 alert handshake failure, no protocols available or Schannel 36874: prove which side lacks a shared TLS version or cipher, fix it and confirm.Read article
Risks and limits
These commands have not been run or lab-tested.
The only Microsoft page that carries the exact warning is an Azure Attestation guide, and it states the TLS cause for the Az modules. The PowerShellGet page states the TLS 1.2 requirement for the Gallery in general. Neither ties this warning to a proxy, a firewall or an offline server. The sample version numbers on Microsoft's page change over time, so read the output of your own Find-Module.
Sources
- Microsoft Azure Attestation troubleshooting guide — Microsoft Learn, page dated 2025-04-15, accessed 22 November 2026
- Install a package manager for PowerShell — Microsoft Learn, page dated 2026-01-27, accessed 22 November 2026
- PowerShellGet and the PowerShell Gallery — Microsoft Learn, page dated 2026-01-27, accessed 22 November 2026
- Install-Module — Microsoft Learn, date not shown, accessed 22 November 2026
- Uninstall-Module — Microsoft Learn, date not shown, accessed 22 November 2026
- Get-InstalledModule — Microsoft Learn, date not shown, accessed 22 November 2026
This article was originally published on .