vscode-powershell
vscode-powershell copied to clipboard
PackageManagement update problem
Prerequisites
- [X] I have written a descriptive issue title.
- [X] I have searched all issues to ensure it has not already been reported.
- [X] I have read the troubleshooting guide.
- [X] I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
Summary
I get error trying to install-module - it finds it, but the module cannot be loaded. Import-module PowershellGet and also PackageManagement. I have an old version of PackageManagement and no way to update it.
I have tried this in VS Code and also in PowerShell ISE
PS C:\WINDOWS\system32> Install-Module -Name PackageManagement -Force -MinimumVersion 1.4.6 -Scope CurrentUser -AllowClobber Install-Module : The 'Install-Module' command was found in the module 'PowerShellGet', but the module could not be loaded. For more information, run 'Import-Module PowerShellGet'. At line:1 char:1
- Install-Module -Name PackageManagement -Force -MinimumVersion 1.4.6 - ...
-
+ CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
PowerShell Version
Name Value
---- -----
PSVersion 5.1.19041.1023
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1023
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Visual Studio Code Version
1.56.0
cfa2e218100323074ac1948c885448fdf4de2a7f
x64
Extension Version
[email protected]
PS C:\WINDOWS\system32> code --list-extensions --show-versions | Select-String powershell
[email protected]
[email protected]
[email protected]
Steps to Reproduce
import-module always fails
Visuals
No response
Logs
No response
found solution