Fixing VSCode PowerShell Issues (Part 1)

by Feb 26, 2021

Occasionally, VSCode stalls when trying to start the PowerShell engine, or reports errors like “Language Server Startup failed”.

If you get the latter exception, this may be related to security settings in your enterprise. To fix, run the following line in a PowerShell console (this is one long line):

Import-Module $HOME\.vscode\extensions\ms-vscode.powershell*\modules\PowerShellEditorServices\PowerShellEditorServices.psd1

If you don’t get a prompt, then this was not the cause of your problems. If you do get a prompt asking for confirmation to import this module, then simply allow to run “software from an untrusted publisher”. This confirmation is required only once, so when VSCode next time is trying to launch the PowerShell engine using this module, chances are your problem is fixed.


Twitter This Tip! ReTweet this Tip!