Vscode

Set PowerShell Core as your terminal in VSCode

Set PowerShell Core as your terminal in VSCode

Microsoft Recently announced the release candidate for PowerShell Core.  This is the cross platform version of PowerShell that is based on .Net Core.  This can be downloaded from here.

Once installed you will have a new black PS icon and through that, access to whole new world of PS goodness.  But what if you want to use this in VSCode?  By default it uses the latest version of “normal” PowerShell that you have installed.  To change this you need to edit your user settings in VSCode.

  1. Open VSCode
  2. Go to File > Preferences > Settings
  3. On the left hand pane, scroll down to the “Integrated Terminal” section and expand it
  4. Copy the line that starts “terminal.integrated.shell.windows:.” and paste it on to the right hand pane, this is your settings that override the defaults
  5. Update the path to point to your PowerShell Core PSWH.exe, making sure that you respect the double “\” and save the file

The complete path I use for the release candidate (using the default path) is

"terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\6.0.0-rc\\pwsh.exe",

If you restart VSCode you will now have PowerShell Core as your terminal,  Enjoy!