Configure Visual Studio Code to run PowerShell for Windows and PowerShell Core Simultaneously

Published Nov 08 2018 03:00 AM 93K Views

I'm a PowerShell fan and have recently adopted PowerShell Core as my version of choice. If you are not familiar with PowerShell Core, it is a cross platform (Windows, Linux, and macOS) version of PowerShell based on .NET Core. That said, I sometimes need to work in PowerShell for Windows or use both side by side.


In this post, I will detail how I've used the Shell Launcher Visual Studio Code extension to configure my Windows system to run PowerShell Core and PowerShell for Windows side by side.


In order to do this yourself, you need a Windows-based system with both Visual Studio Code and PowerShell Core installed.


For more information on PowerShell Core see Installing PowerShell Core on Windows.


Configure default PowerShell version


Before configuring Shell Launcher, I want to set PowerShell Core as the default PowerShell version. To do so, open up the VS Code user settings.json file by clicking on file > preferences > settings, select ... and then Open settings.json.


Modify the settings.json file to include The update must be well formed json. If you have other settings in your settings.json file, you may need to adjust the following example.


    "": "c:/Program Files/PowerShell/6/pwsh.exe"


Now, when opening up a terminal in Visual Studio Code, PowerShell core should be the default version.


PS C:\storage\code\azure-powershell-demos> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0
PSEdition                      Core
GitCommitId                    6.1.0
OS                             Microsoft Windows 10.0.17134
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
WSManStackVersion              3.0


Install the Shell Launcher Visual Studio Code extension


The key to opening PowerShell Core and PowerShell for Windows side by side is the Shell Launcher Visual Studio Code extension. Shell Launcher allows you to configure multiple shells within Visual Studio Code.


Install the extension by clicking on the Visual Studio Code extensions button and searching the market place for shell launcher. Once located, click install.


Thanks a bunch to Daniel Imms for putting together this extension. Be sure to check our more extensions by Daniel, which can be found here - .


Configure keyboard bindings for Shell Launcher


Before using shell launcher, a key binding needs to be created to engage the shell launcher.


Open up the Visual Studio Code keybindings.json file by clicking on file > preferences > Keyboard Shortcuts and then selecting keybindins.json.


Add the following to the keybindings.json file to configure ctrl + shift + t as the shell launcher key binding. The update must be well formed json. If you have other settings in your keybindins.json file, you may need to adjust this example.


"key": "ctrl+shift+t",
"command": "shellLauncher.launch"


Save and close the file when done.


Configure multiple PowerShell terminals


Open up the VS Code user settings.json file by clicking on file > preferences > settings, select ... and then Open settings.json.


Adding the following to the settings.json file configures two shells, one with PowerShell Core and another with Windows PowerShell. You can adjust the display names (labels), as well as add additional shells such as WSL and CMD.


"": [{
        "shell": "c:\\Program Files\\PowerShell\\6\\pwsh.exe",
        "label": "PowerShell Core"
        "shell": "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe",
        "label": "Windows PowerShell"


PowerShell side by side in action


Now, when initiating the Shell Launcher, you should see a menu similar to this. Select the desired version of PowerShell and rock on.




To run both versions of PowerShell side by side, open a terminal with the non-default version of PowerShell (PowerShell for Windows in my case), and then click the split terminal button. This will open another side-by-side terminal with the other PowerShell version (PowerShell Core in my case).




Fully configured settings.json file


For completeness, here is a full copy of a settigns.json file with everything detailed in this post.



    "": "c:/Program Files/PowerShell/6/pwsh.exe",

    "": [{
            "shell": "c:\\Program Files\\PowerShell\\6\\pwsh.exe",
            "label": "PowerShell Core"
            "shell": "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe",
            "label": "Windows PowerShell"


Established Member
That for a great write-up. The shellLauncher extension is a great find, too.

Appreciate the feedback Rob.

New Contributor

Hello Neil,


Great write-up! I found this article while searching similar solution... On my computer I have Powershell 5.1 and Powershell Core 6.1.3. I use PS 5.1 for scripts with AzureRm module, and now I want to use PS 6.1 Core for scripts with Az module - I want to have them separated that way. Is there a way to configure VSCode in the way that  scripts using Az module will be debugged in one debugger (debugger profile, etc.. debugged in PS 6.1 in general) and scripts with AzureRm module will use debugger from PS 5.1 ?



Established Member

Hi Neil!

Thank you for the info.


I must be missing something, Everything seems to be working correctly has I can get multiple session running with different version. My only issue is that when I open a PS1 file and start debugging it always goes back to PowerShell 5 even do I have defined my default shell as 6.2.2 the integrated shell always seems to go back to 5?


Any help would be appreciated.

Occasional Visitor

@Frank_f  : I also see the same thing. Looking for a way to keep the version of the "PowerShell integrated console "to 7 (am using the preview version). Any luck finding the solution yet?

Occasional Visitor

To add, in the latest VScode I couldn't find settings.json under ... i.e. file > preferences > settings, select ... and then Open settings.json.

I could find this file by clicking on the file icon in the right corner clipboard_image_0.pngHope this helps to someone working with your post. Thanks for sharing! 


Hi, I see that the link to install powershell 6 is not valid anymore, this is the new link.

The Path to which Powershell core is now installed, for me, is going to C:\Users\xxx\vcpkg\downloads\tools\powershell-core-6.2.1-windows


When I open VSCode and add this to the settings.json, nothing seems to be happening? Could this also have changed?


    "": "C:\Users\xxx\vcpkg\downloads\tools\powershell-core-6.2.1/pwsh.exe"

$PSVersionTable still shows the old version. When I look at the terminal, I still only see Powershell Integrated, no extra terminal is coming in.


 What am I doing wrong?


After that I tried to install the shell launcher, I took over the windows settings in my settings.json, with the path in which it installed at my pc.


When I now try to open it with shell launcher, it throws an exception.


Senior Member

@Pramod_Yadav @Frank_f 
Experiencing the same issue, trying to find a solution to this. I'll post in here if I find one. Keep me up-to-date with your findings also please.

Regular Contributor


I have got Visual Studio Code 1.43.1 to successfully toggle between PowerShell Core V7 and Windows PowerShell 5.1 using the ShellLauncher.  PowerShell Core 7 doesn't seem to like it's predecessor, so removes the install directory.



"": "C:/Program Files/PowerShell/7/pwsh.exe",    
    "": [{
        "shell": "C:/Program Files/PowerShell/7/pwsh.exe",
        "label": "PowerShell 7 Core"
        "shell": "C:/Windows/system32/WindowsPowerShell/v1.0/powershell.exe",
        "label": "Windows PowerShell 5.1"

I can use the key mapping in the editor pane to switch the PowerShell version, displayed in the terminal window  drop down version selection  - you don't get the nice label ( see above)  and also you seem to get lots on instances if you repeatedly toggle:

ShellLauncher multiple configs.png

Hope this helps somebody.

Respected Contributor

@Neil Peterson This is a few years old, and seem a bit out of date. Could you please provide an update to help us out TIA

Version history
Last update:
‎Mar 23 2019 07:04 AM
Updated by: