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):
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.