PowerShell Unable to find module providers (PowerShellGet) - Windows 10

MARCEL BALCAREK 61 Reputation points
2021-02-03T22:48:20.177+00:00

Hello, I have a windows 10 machine, and recently tried to install some packages and failed. I have seen several posts on this issue, but have not found a solution. Can someone give me a path forward? I do not use FIPS.

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 
Install-PackageProvider -Name NuGet -Force

Install-PackageProvider : Unable to find repository with SourceLocation ''. Use Get-PSRepository to see all available repositories.

Get-PSRepository

PackageManagement\Get-PackageSource : Unable to find module providers (PowerShellGet).

Get-PackageProvider  

Name Version DynamicOptions


NuGet 2.8.5.208 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate

Get-PackageProvider -ListAvailable

Name Version DynamicOptions


NuGet 2.8.5.208 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate

Get-InstalledModule PowerShellGet

PackageManagement\Get-Package : Unable to find module providers (PowerShellGet).

Get-Module PowerShellGet

ModuleType Version Name ExportedCommandsemphasized text*


Script 1.0.0.1 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCapability...}

Get-PSRepository

PackageManagement\Get-PackageSource : Unable to find module providers (PowerShellGet).

Install-Module -Name PowerShellGet -Force

PackageManagement\Install-Package : Unable to find module providers (PowerShellGet).

Update-Module -Name PowerShellGet

Update-Module : Module 'PowerShellGet' was not installed by using Install-Module, so it cannot be updated.

Register-PSRepository -Default -Verbose

VERBOSE: PowerShell meta provider initialization failed.
VERBOSE: No match was found for the specified search criteria and provider name 'PowerShellGet'. Try 'Get-PackageProvider -ListAvailable' to see if the provider exists on the system.
PackageManagement\Register-PackageSource : Unable to find module providers (PowerShellGet).

$PSVersionTable

Name Value


PSVersion 5.1.18362.752
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.752
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Windows for business Windows Server User experience PowerShell
{count} votes

Accepted answer
  1. Riley, Russel 186 Reputation points
    2021-04-13T16:55:24.473+00:00

    I may have resolved this exact same issue today. I noticed that this problem occurred only for my main user on my machine - other user accounts didn't have a problem. I noticed that in my Documents\WindowsPowerShell folder I had a "Modules" folder, which included a module for "PackageManagement." Deleting the entire Modules folder resolved the issue for me.

    What's worse, I have OneDrive known folder redirection turned on, which meant this folder was being replicated to every machine where I logged in, which broke PowerShell for me on every machine I touched.

    22 people found this answer helpful.

5 additional answers

Sort by: Most helpful
  1. Sandip Tari 0 Reputation points
    2024-02-05T17:03:05.06+00:00

    Solution found!   https://blogs.technet.microsoft.com/keithmayer/2016/01/06/quick-tip-using-azure-powershell-with-web-... at Step 2 (Optional) – Add Proxy Credentials to Script:   To use Windows credentials for proxy authentication, you can add …
    [System.Net.WebRequest]::DefaultWebProxy.Credentials =  [System.Net.CredentialCache]::DefaultCredentials  PS C:> Register-PSRepository -Default -Verbose VERBOSE: Performing the operation "Register Module Repository." on target "Module Repository 'PSGallery' () in provider 'PowerShellGet'.". PS C:> Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted ...and when I added that in a new PowerShell session, Get-PSRepository shows the expected:   Name                      InstallationPolicy   SourceLocation
    ----                      ------------------   --------------
    PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2/   ...and Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.4.0 works, so obviously a proxy issue all along.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.