PackageManagement Module Update Problem
See original GitHub issueIssue Description
When I start Powershell Extension, VSCode warns me about a conflict with the current version of PackageManagement module and recommend me to update it. When I run command :
powershell.exe -NoLogo -NoProfile -Command 'Install-Module -Name PackageManagement -Force -MinimumVersion 1.4.6 -Scope CurrentUser -AllowClobber
It gives error :
WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2/'.
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'PackageManagement'. Try Get-PSRepository to see all available
registered module repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1772 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
When I try to run the same command from my OS’s powershell console, it works as expected.
I use TLS1.2 as security protocol.
Kind regards
Environment Information
Visual Studio Code
Name | Version |
---|---|
Operating System | Windows_NT x64 6.3.9600 |
VSCode | 1.46.0 |
PowerShell Extension Version | 2020.6.0 |
PowerShell Information
Name | Value |
---|---|
PSVersion | 5.1.14409.1018 |
PSEdition | Desktop |
PSCompatibleVersions | 1.0 2.0 3.0 4.0 5.0 5.1.14409.1018 |
BuildVersion | 10.0.14409.1018 |
CLRVersion | 4.0.30319.42000 |
WSManStackVersion | 3.0 |
PSRemotingProtocolVersion | 2.3 |
SerializationVersion | 1.1.0.1 |
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
Extension | Author | Version |
---|---|---|
code-spell-checker | streetsidesoftware | 1.9.0 |
csharp | ms-dotnettools | 1.22.0 |
csharp2ts | rafaelsalguero | 0.0.24 |
debugger-for-chrome | msjsdiag | 4.12.8 |
githistory | donjayamanne | 0.6.5 |
mssql | ms-mssql | 1.9.0 |
powershell | ms-vscode | 2020.6.0 |
react-native-snippet | jundat95 | 0.5.6 |
vscode-docker | ms-azuretools | 1.2.1 |
vscode-eslint | dbaeumer | 2.1.5 |
vscode-react-native | msjsdiag | 0.16.0 |
vscode-typescript-tslint-plugin | ms-vscode | 1.2.3 |
xml | DotJoshJohnson | 2.5.0 |
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Unable to update PowerShellGet , error: The version '1.4.7' of ...
Powershell: Unable to update PowerShellGet , error: The version '1.4.7' of module 'PackageManagement' is currently in use · I try this command:
Read more >Cannot install powershell modules - Microsoft Q&A
My problem is that I am not able to install modules to my powershell console. Example: Install-module -Name AzureAD. PS C:\WINDOWS\system32> ...
Read more >Update PowerShellGet and PackageManagement
I wanted to share some information how you can update PowerShellGet and PackageManagement to the latest version. Check it out!
Read more >PackageManagement\Install-Package : Unable to find repository
I was installing newest version of my PSWinDocumentation module on Windows 2016 when I noticed I can't really get anything to update.
Read more >The case of potentially broken Package Management for ...
A couple of months ago though, I stumbled upon a curious issue where my PackageManagement module misbehaved after a fast ring update.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
the powershell command to install the update should include the command to use TLS1.2
Had a similar issue: updated to the new 2020.6 which caused a bunch of problems:
Eventually what saved me (at least for the moment it seems) was executing the command @MSIH wrote, but with 1 exception: changed -Scope CurrentUser to Allusers=>
powershell.exe -NoLogo -NoProfile -Command '[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; Install-Module -Name PackageManagement -Force -MinimumVersion 1.4.6 -Scope AllUsers -AllowClobber -Verbose'
No more anoying popup about the Packagemanger. Also I could get back into the settings.json and added the following line:
"powershell.powerShellDefaultVersion": "Windows PowerShell (x64)"
Finally I can work again 😃