Unable to start PowerShell extension on Windows without PS 6+ installed
See original GitHub issueHi there,
After the the extension upgrade to 2019.9.0, I started to get the following error
30/09/2019 11:02:49 [NORMAL] - Visual Studio Code v1.38.1 64-bit
30/09/2019 11:02:49 [NORMAL] - PowerShell Extension v2019.9.0
30/09/2019 11:02:49 [NORMAL] - Operating System: Windows 64-bit
30/09/2019 11:02:49 [NORMAL] - Path specified by 'powerShellExePath' setting - '' - not found, reverting to default PowerShell path.
30/09/2019 11:03:15 [ERROR] - <ConsoleFeature>: Unable to instantiate; language client undefined.
Installed the previous version 2019.5 and was able to load the integrated terminal and run PS cmdlets
VERBOSE:
#-- Console Encoding ---------------------------------------------------------
VERBOSE: System.Text.ASCIIEncoding
VERBOSE:
#-- Updated PSModulePath to: -------------------------------------------------
VERBOSE: C:\Users\mohamed\Documents\WindowsPowerShell\Modules
VERBOSE: C:\Program Files\WindowsPowerShell\Modules
VERBOSE: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
VERBOSE: c:\Users\mohamed\.vscode\extensions\ms-vscode.powershell-2019.5.0\modules
VERBOSE:
#-- Check required modules available -----------------------------------------
VERBOSE: Testing module availability PowerShellGet
VERBOSE: Populating RepositorySourceLocation property for module PowerShellGet.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2\PSModule.psm1'.
VERBOSE: Populating RepositorySourceLocation property for module PowerShellGet.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.1.4\PSModule.psm1'.
VERBOSE: Populating RepositorySourceLocation property for module PowerShellGet.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.0.4\PSModule.psm1'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1'.
VERBOSE: PowerShellGet found
Versions
> code --list-extensions --show-versions
akamud.vscode-theme-onedark@2.1.0
bmuskalla.vscode-tldr@1.0.0
CoenraadS.bracket-pair-colorizer@1.0.61
Darfka.vbscript@1.0.4
DougFinke.vscode-PSStackoverflow@0.0.2
eamodio.gitlens@10.0.1
formulahendry.code-runner@0.9.14
ms-vscode-remote.remote-wsl@0.39.5
ms-vscode.powershell@2019.9.0
Shan.code-settings-sync@3.4.3
Tyriar.shell-launcher@0.3.0
> code -v
1.38.1
b37e54c98e1a74ba89e03073e5a3761284e3ffb0
x64
> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.18362.145
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:22 (5 by maintainers)
Top Results From Across the Web
Starting Windows PowerShell
On the Start screen, type PowerShell and then click Windows PowerShell (x86). · In Server Manager, from the Tools menu, select Windows PowerShell...
Read more >Visual Studio Code Powershell startup failure
Right click on the PowerShell extension and select "Install Another Version..." Pick version "2020.1.0". It also suggests disabling auto update.
Read more >Fix for PowerShell Script cannot be loaded because ...
This is due to the Windows PowerShell execution policy being set to prevent untrusted scripts which can affect your Windows client ...
Read more >PowerShell editing with Visual Studio Code
The extension works anywhere you can run VS Code and PowerShell 7 or higher. The extension also works for Windows PowerShell 5.1.
Read more >Installing the AWS Tools for PowerShell on Windows
If you are not logged in as a user with administrator rights, open a PowerShell session as Administrator. Choose Start, and then choose...
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 Free
Top 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

Hi, I ran into the same issue yesterday, the issue suddenly appeared. I could no longer run PS commands in VSCode with the PS extension, although I tried to reconfigure it properly. My solution was to upgrade PS 6.2.x to PS 7.0. Then it worked again. dotnet tool update --global PowerShell Tool ‘powershell’ was successfully updated from version ‘6.2.3’ to version ‘7.0.0’. https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools hth! br, Toni
Thanks, I forgot about that GUI prompt.
I’ve verified it also works w/ PoSh 7 (Preview 4), without 6 installed.