Using PowerShell in VS Code

Problem:

When I start PowerShell from the integrated terminal in VS Code I get a warning about not being able to load PSReadLine.

PowerShellCodeError

Solution:

Set the Execution Policy to RemoteSigned.

  1. Start Code as Administrator
    image
  2. Open the Integrated Terminal
  3. Type powershell
  4. Type Set-ExecutionPolicy –ExecutionPolicy RemoteSigned
    PowerShellResolution

Now you can restart Code and start PowerShell from the integrated terminal with no warnings.

Fixed

Comments (1) -

  • John Brown

    1/22/2021 12:50:12 PM | Reply

    Great solution, works for opening terminal in vs code when using venv.

Add comment

Loading