How to install Visual Studio Code and configure it as a replacement for the PowerShell ISE

If you follow me on Twitter, then I’m sure you’re aware that I’ve been using nothing but VS Code (Visual Studio Code) as a replacement for the PowerShell ISE (Integrated Scripting Environment) for the past couple of weeks and while I had tried it in the past, I didn’t previously think it was ready for prime time. That’s now changed with all of the updates and work that has gone into it. From what I’ve found, it works fairly well flawlessly so I’ve created a short and simple video to help others get VS Code installed and configured as a replacement for the PowerShell ISE.

Let me know what you think and if you’d like to see more videos from me.


Update – I decided to add a brief summary of the video based on some of the feedback I received.

Go to code.visualstudio.com and download VSCode (Visual Studio Code) for your operating system. I also recommend downloading the version that matches your operating system’s architecture (32 or 64 bit). I take all of the default options during the installation.

Install the PowerShell extension for VSCode. I also like to install the vscode-icons extension.

Once the extensions are installed, reload VSCode by clicking the Reload button:

Click on the Gear on the bottom left and select Settings:

Enter the following settings on the right side of the settings screen.

For more details, see the video.

µ

11 Comments

  1. David Cobb

    Thanks Mike! Very useful. Interested in learning more about what PSScriptAnalyzer can do in VSCode.

    Reply
  2. Joel Reed (@AKAJoelReed)

    Awesome video Mike. Definitely going to pass this one on. Been using Code a while now myself and can’t imagine going back.

    Only feedback I would give would be maybe checking the “Add Open with Code action …” options for both file and folder context during install, I don’t know of anyway to do it post install. I find them handy when I’m opening up my modules to work on them. Since VS Code is directory centric it’s really handy to open my module hierarchy all at once from file explorer. But from a “make it like ISE” perspective I can see where that might be out of the scope.

    Thanks for the tip about editor.mouseWheelZoom option, that was new to me!

    Reply
  3. Jithin

    Thanks Mike. Very very helpful

    Reply
  4. Larry

    Your video is awesome! However, could you please list the settings in your post. Thanks

    Reply
  5. STEPHEN BELL

    Exactly what I am looking for…thank you and we done. I would love to see something on debugging and source control integration if you are compiling a list 🙂

    Reply
  6. Jacob

    Do you know if there is any way to incorporate the show-command like it is in the ISE. That was one of the great features that seems to be missing from visual studio code. Even when trying to just run show-command to open it there is an error in visual studio code.

    Thanks in advance to any insight on this. Great video to get people going.

    Reply
  7. Mike Fal

    Thanks Mike, very interesting. I still have a couple concerns with VSCode that keep me in a “hybrid state”, with VSCode for serious PowerShell dev and the ISE for ad hoc work. The first is that the integrated shell still doesn’t let me do ctrl+c/ctrl+v. The second is that it bombs on -ShowWindow for Get-Help, which I use a lot.

    Not sure if you have a pipeline to the @code team (or the PowerShell extension devs), but these improvements would likely get me to move over for everything.

    Reply
  8. Halis

    Is it possible to make shortcut CTRL+R work like in ISE (switch between code and PShell)?

    Reply
  9. Kevin Brennan.

    Thanks for sharing this Mike.

    Reply
  10. Mike Rood

    Very helpful. Thanks, Mike!

    Reply
  11. Michael West

    Thanks Mike! Looks really good.

    Reply

Leave a Reply

%d bloggers like this: