Hi shionfish,
What does the cmdlet Get-PSRepository return? Try removing the WindowsPowerShell\Modules in your Documents directory and see if it fix the issue.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
My system version is Server 2012 R2. When I use Install-module, I always get a prompt that the repository whose SourceLocation is "" cannot be found. Please use Get-PSRepository to view all available repositories。When I get-PSRepository, it prompts PackageManagement\Get-PackageSource: The package provider (PowerShellGet) cannot be found. When I get-PackageProvider -ListAvailable, I can get the information of nuget 2.8.5.208。It is currently confirmed that TLS1.2 is enabled for communication.I also tried to switch to another user to execute the install command. The same thing happened. I used sfc /scannow and Dism /Online /Cleanup-Image /ScanHealth and Dism /Online /Cleanup-Image /CheckHealth to scan the system without any problems.There is currently no other way to try. I hope to find a solution from a technical expert. Thank you very much.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.
Hi shionfish,
What does the cmdlet Get-PSRepository return? Try removing the WindowsPowerShell\Modules in your Documents directory and see if it fix the issue.
嗨,shionfish,
cmdlet Get-PSRepository 返回什么?尝试删除 Documents 目录中的 WindowsPowerShell\Modules,看看它是否解决了问题。
Deleted WindowsPowerShell\Modules and still have the problem。PackageManagement\Get-PackageSource : The 'PackageManagement\Get-PackageSource' item is not recognized as the name of a cmdlet, function, script file, or executable program. Please check the spelling of the name and, if a path is included, make sure the path is correct and try again.