Move Over PowerGUI – Time (finally!) for a New Editor
I’ll be the first to admit I sometime spend too much time with tools that work for me. One of those tools is the PowerGUI script editor. I had been holding out hope that after the Dell acquisition of Quest Software and its subsequent spin-off that PowerGUI would release to the public domain, but with no changes in 3+ years and a hiccup in the current tool, I’m now tossed between two different environments for development – VisualStudio Code and Powershell ISE. Here’s my take on both.
I was first introduced to PowerGUI by way of Virtualization EcoShell. vEcoShell was an MMC-like tool that used PowerCLI and Powershell to handle a number of functions within a VM environment. vEchShell was a spin-off of the free version of PowerGUI – which had the same functionality but was also extensible with packs for Active Directory, Exchange, etc., etc. When vECOShell development ceased, I switched to PowerGUI, and it’s associated Powershell editor. It had everything I needed – syntax highlighting, tab complete, an integrated run shell and most important a built-in variable explorer which allowed for walking through objects to see the values on different properties. For better than six years, the editor worked perfectly well for my scripting needs, then for some reason upgrading to PowerCLI 6.5 R1 threw my integrated run shell for a loop making it difficult, though not impossible, to see where my cursor was in the shell – time for a new editor. As I mentioned in the intro I’m tossed between two editors, I’ll go over why below, all the while, I’ll be keeping in mind my criteria for why I used PowerGUI for so long.
Powershell ISE is the native powershell editor for Windows. Like PowerGUI, it has the editor, tab complete, and a run shell. The variable explorer is absent. Fortunately there is an add-on available and it appears to work well, though slower than the native one in PowerGUI. You can find it here in the technet gallery. Unfortunately, it takes a bit of work to get it running, and the author is no longer supporting it. In an upcoming post, I’ll go over how to get Powershell ISE functionally similar to PowerGUI.
Pros: Powershell ISE comes with and native to windows, decent editor and tab complete along with other features you’d expect in a script editor, FREE
Cons: Extensions can be difficult to install, support for extensions can be fleeting, can only be used for Powershell
Visual Studio Code
I was more recently introduced to Visual Studio Code. It’s a free cross-language editor developed by Microsoft that can be downloaded here. What I like about this one is that it can hook into Github, it has the syntax highlighting (once the Powershell module is added on), tab complete, and will debug in an integrated shell. It’s also got the variable explorer, though it is not as intuitive. As I mentioned earlier, I often use the variable explorer to identify properties of object and their values. It’s a great learning, and fact-checking tool. In VS Code, the variable explorer is not persistent between runs, this is because the host environment resets between runs, what I found I have to do, it toggle a break-point in my code in order to use the variable explorer, at least for exploring.
Pros: Feature-rich, professional editor, cross-language support, Github support, large extension library, skinnable
Cons: debugger has a per run instance persistence
Well, I’m still up in the air on this one. I’ve found when I need to do something quick (one-off task, test or edit something in the PowerCLI communities) PowershellISE is the first icon I click on. If I’m really editing a script, or working on a project I go with Visual Studio Code.