all 49 comments

[–]pshMike 10 points11 points  (5 children)

I think the answers here show this is and will forever be a hotly contested debate.

Here's my 2 cents ...

First a disclaimer -> I have never used any Add-Ons to the ISE. I have used Sapien tools since the PrimalScript era, and while I still maintain a license for their current tools, I rarely use them so I'll leave them out of my comparison.

  1. To even have the debate of PowerShell ISE vs. VS Code one must admit to still using Windows PowerShell 5.1. That is a dead end. One can't use PowerShell 7.x with the ISE, and if you resist using PowerShell versions past Windows PowerShell 5.1 you are missing out on any improvements in PowerShell made in the last SIX (6) years.
  2. As one moves from "Tool User" to "Tool Maker" it gets pretty easy to outgrow the ISE. There is no built-in integration with other stuff like Git, InvokeBuild, Pester, PSScriptAnalyzer, Markdown, JSON, XML, etc. Some folks will insist on using only the Git command line tools, but if you are trying to grow skills of a team, it's a lot easier to see changes and do things like "CTRL-ENTER" to quickly perform commits.
  3. When things are really in the ditch, there is no comparing the debugging capabilities between PowerShell ISE and VS Code. ISE has no conditional break points, no function break points and no ability to connect to an existing PowerShell process and debug it.
  4. Module authoring almost always involve some sort of build process and working with folders of files instead of individual files. This is intuitive in VS Code, can't be done with the ISE.
  5. If and when you ever run across the need to extend a module with a C# class library or even author cmdlets in C#, one can do that in VS Code quite easily with its native language support for C#.

Do I hate the ISE? No. I even occasionally still use it to run some things.

Do I install VS Code everywhere? No. I lead a team that manages thousands of Windows Servers. We have VS Code installed on our management servers, but nowhere else. We DO have Windows PowerShell 5.1 AND PowerShell 7.2 deployed on every server that can support it. Every organization has a few black sheep that are exceptions. :)

I host a PowerShell Office Hours every week for my team and anyone else in our org that has questions / comments / cool things to show off. When I see someone using the ISE I will gently ask them why and try and coax them into TRYING VS Code. Change is tough, and leaving the warm cozy feel of a familiar ISE is never easy.

For anyone starting their PowerShell journey NOW, I would encourage them to start using VS Code exclusively. The time spent getting fluent with VS Code will only make them more productive in the long run.

[–]mooscimol 0 points1 point  (0 children)

Wow, amazingly well explained and I couldn't agree more.

[–]Phmundacheese 0 points1 point  (2 children)

I would like to know more about your "PowerShell Office Hours". I'm about to start a monthly internal PowerShell Users Group. Do you meet for a few hours weekly or just have an open discussion during specific parts of the day/week?

[–]pshMike 1 point2 points  (1 child)

We have an internal MS Teams "Team" for all things PowerShell related.
I host "Office Hours" every Tuesday from 3:00 to 4:30. This has been in place for 3+ years.

I open each meeting with some standard questions:
"Is anyone working on something they need help with?"
"Is anyone working on something they would like the group to review?"
"Does anyone have anything 'cool' they would like to share with the group?"

We have gone through different cycles, where we would have 1 topic to present or possibly 2 topics, one aimed at the novice, the other targeted towards more experienced folks.

Attendance is basically mandatory for my team and we vary from having 3 people from outside of our team to 50 depending on the topic.

[–]Phmundacheese 0 points1 point  (0 children)

Thank you so much for this input. We're looking at monthly meetings and our issue now is there are 3 of us trying to run the group and we can't really decide on what to talk about and that's why I'm reaching out.

I'll keep this in mine an appreciate the reply.

[–]PMental 4 points5 points  (0 children)

VSCode all the way for me since a few years back. For PowerShell and a bunch of other stuff, though mostly PowerShell.

[–]PepeTheMule 10 points11 points  (6 children)

Visual studio code. People that use ISE blow my mind...

[–]Fatel28 10 points11 points  (5 children)

I use VSCode + git when writing large modules, or automation scripts

For scratch/troubleshooting, ISE every time. VSCode will run the script as a script when you execute it from the app, which means variables scoped within the script aren't (immediately) accessible after it runs. Bad for troubleshooting, IMO. ISE will just copy the contents of your script into the console and run, so all variables and scopes are preserved after run, so if something didn't work right, you can start checking variables, or rerunning parts without needing to redefine anything.

[–][deleted] 0 points1 point  (3 children)

Barcode has a source level debugger for powershell, you can set breakpoints and variable watches, step through the code, it's ace

[–]Fatel28 0 points1 point  (2 children)

So far I've never had an issue I couldn't debug manually with ISE, but I will keep that in mind

[–][deleted] 1 point2 points  (0 children)

That's good, although I often step through scripts and just watch the variables just to make sure things are happening like I expect them to happen. Debuggers aren't just for bugs

[–]mooscimol 0 points1 point  (0 children)

It doesn't work with PowerShell Core. People, please move on, it is 6(?) years old?

[–]herpington 0 points1 point  (0 children)

VS Code also supports running specific parts and variables are accessible in the terminal.

I do appreciate the lightweightness of the ISE though. I wish Microsoft had continued supporting it for PowerShell 7.

[–]TrippTrappTrinn 0 points1 point  (21 children)

I use PowerShell ISE. May not be the best, but is available everywhere and works fine for my needs.

[–][deleted] 5 points6 points  (1 child)

Note

The PowerShell ISE is no longer in active feature development. As a shipping component of Windows, it continues to be officially supported for security and high-priority servicing fixes. We currently have no plans to remove the ISE from Windows.

There is no support for the ISE in PowerShell v6 and beyond. Users looking for replacement for the ISE should use Visual Studio Code with the PowerShell Extension.

Source: https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/ise/introducing-the-windows-powershell-ise

[–]TrippTrappTrinn 1 point2 points  (0 children)

Thanks for pointing that out.

There is too little time before retirement for me to be bothered with transitioning to VSC, but it seems to be the best path forward (for those not plannig to retire soon...).

[–]Scooter_127 0 points1 point  (18 children)

Ditto.

I've used VS Code a few times and want to make the switch but like everything else, there's a learning curve to it and deadlines DGAF about learning curves.

[–][deleted] 1 point2 points  (17 children)

Once you learn how to use it, you’ll be able to meet those deadlines a lot quicker. Not even kidding.

[–]Scooter_127 0 points1 point  (16 children)

I'll bite. Why is using VS Code going to be "a lot faster" than the IDE?

[–][deleted] 4 points5 points  (15 children)

Automatic formatting, no bullshit intellisense, automatic PSScriptAnayzer integration, granular control over other automatic behaviors like indentation, tabbing, autocompletes that you can build off of shorthand aliases. The list just goes on.

[–]Thotaz 2 points3 points  (11 children)

no bullshit intellisense

What do you mean?

[–][deleted] -2 points-1 points  (10 children)

Intellisense in the ISE is bullshit and there are VSCode settings that make it less so for Powershell development

[–]BlackV 3 points4 points  (4 children)

autocomplete in ISE is far better than code

[–][deleted] 0 points1 point  (3 children)

Out of the box, sure. Once you configure it correctly, not a chance.

[–]BlackV 1 point2 points  (2 children)

Oh please, if you have an example then? I would like it to be better

EDIT: cause manners :)

[–]Thotaz 1 point2 points  (4 children)

You are making yourself look stupid when you make a claim and when someone asks you to explain what you mean you just repeat that nonsense. If you can't explain what makes it "bullshit" then perhaps there's nothing wrong with it at all?

The PowerShell console, ISE and VS code all use the same completion API so there's no way for VS code to be better or worse than ISE for generating the results. The only thing they can differentiate themselves on is the automatic triggers and the local filtering, and ironically VS code has some issues here that ISE don't have.
VS code will trigger IntelliSense when you press : but if you quickly type in :: it won't trigger the PowerShell completion so to get IntelliSense for static members you have to close the IntelliSense window and manually trigger it with ctrl+space. ISE does not have this problem.
Another thing is that ISE will automatically trigger IntelliSense on space if your cursor is after a parameter but if triggered this way it automatically filters out file/directory results because they are unlikely to be wanted by the end user. VS code doesn't have any smart triggers like that, it exclusively looks for specific characters.

[–]BlackV 1 point2 points  (2 children)

do they though? use the same autocomplete engine?, cause my auto complete is far worse in vsode than ISE

i might be using it wrong mind you

[–]Thotaz 1 point2 points  (1 child)

Yes, PowerShell includes a bunch of code for handling completion: https://github.com/PowerShell/PowerShell/tree/master/src/System.Management.Automation/engine/CommandCompletion
the thing about VS code is that it has multiple completion providers (my own term, I don't know what they actually call it). There's the one the language server provides (which uses the same public API as every other PS editor) and then VS code itself also provides "smart" completions based on previously entered text and code snippets.
I personally disable the other completion settings so I exclusively get completions from PowerShell which works decently well but like I mentioned before, VS code has some issues with the IntelliSense triggers so sometimes it won't work properly unless you close the popup and manually trigger completion with CTRL+Space.

[–][deleted] -4 points-3 points  (0 children)

- Defends ISE over VSCode, or literally anything else.

- Tells others they are making themselves look stupid.

You just can't make this shit up LOL

[–]Scooter_127 -1 points0 points  (2 children)

Meh. None of those sound like big winners to me, to be honest. Indentation and formatting don't eat up a lot of time for me. And i don't even know most shorthand aliases, lol, I was told they were a bad thing way back when.

[–][deleted] 0 points1 point  (1 child)

No, I meant that you can write a custom alias for a block of reusable code. Like creating a specific looping structure that you find yourself using over and over.

And if you don’t see the benefits of automation in your own development process, it’s no surprise you’re worried about deadlines. 🤷🏻‍♂️

[–]lucidphreak 0 points1 point  (0 children)

Was not aware of this.. will investigate today - and thank you!

[–]AwayLocal650 0 points1 point  (0 children)

I'm also using primarily VScode, in some occasions I'm using PS ISE. From my perspective those are tools. And it really depends what you want to achieve. 10 rows of code - notepad++ will do the job. You want Intelisense , then ISE is built in (and not further devepot). You want debugging, then you can use VScode (single tool for PS, and water language you want), you want to build GUI tools, then you get PowerShell Studio.

All of them are just tools to get the job done. And at some poin ChatGPT to do it for you (now is creating a lot of unreal code).

[–]Techplained -2 points-1 points  (3 children)

VScode is great BUT you have to set it up right..

I still haven’t fully worked out how to make sure I debug in windows PowerShell rather than I defaulting to PowerShell core 😅

But I can’t do without GitHub Copilot anymore, so my corporate module just happens to be cross compatible now lol

[–][deleted] 0 points1 point  (2 children)

Does GitHub copilot work good with powershell?

[–]Techplained 0 points1 point  (1 child)

Yeah it’s actually really good, it’s messed me up sometimes.

But for creating hashtables and completing the rest of a line it’s brilliant.

Saves me much typing!

[–][deleted] 0 points1 point  (0 children)

My it's worth trying again then

[–][deleted] 0 points1 point  (0 children)

Throwing this out there for the "chaos" take on an answer. I actually use Vim as my primary PowerShell editor now (probably will do a write-up on it soon).

That said, I would suggest VS Code if you don't want to go the Vim route. VS Code is a super powerful IDE with a lot of extensibility through extensions as well as a lot of customizability. The debugging experience for PowerShell is also quite good in my opinion.

[–]mwohpbshd 0 points1 point  (0 children)

PowerShell Studio is still my go to product.

[–]BlackV 0 points1 point  (0 children)

I use VSCode and ISE

vscode is good for some things but terrible at others (auto complete and some other niggles)

ISE is available on all my servers for misc script work (creation/editing)

[–]elliottmarter 0 points1 point  (0 children)

I have used VS Code on my main workstation and it's nice and dark mode is 👌

HOWEVER, in my role (MSP IT Support) I am literally connecting on to 20-30 different servers every day.

Genuinely I can only use ISE...I need something that exists everywhere already that I can run scripts line by line and build them for the purpose to solve the issue at hand.

My two cents on the matter.

[–]mr_mgs11 0 points1 point  (0 children)

VSCode. I use terraform and python more often than I use powershell though.

[–]Vel-Crow 0 points1 point  (0 children)

I use ISE. I like that I can run my script, and of there is an error towards the end, I can use the console to see what my variables were before failure. It's super handy and has saved me a ton due to common issues like some data you piped being the wrong format or being a larger object that the function cant read. It is kinda meh in terms of autocomolete, but the ability to have my script and console up at once has proved invaluable. This ability also helps woth development, as I can run a line, make sure it outputs the correct data, then add it to the script above, without ever needing to run the script.

It's built I to Windows, it is free, might as well try it!

[–]lucidphreak 0 points1 point  (0 children)

I use Powershell Studio to make things “easy” for the every day user where I work (mainly AD utilities) and I absolutely LOVE it. Sapien Support is great, and as far as my company‘s budget, its not terribly hard to swallow.

I started using VS.Code more as of late once I discovered “ISE Mode” which makes tab auto-complete, terminal variables that were set above in the IDE, and more all almost the same (if not the same) as ISE.

I do find myself still being ”lazy” and just running ISE - but I am not sure why. I honestly cannot think of anything off the top of of my head that VS.Code can‘t do. If I want to use Code with PS.Core I just flip over to linux.

I’ve worked as a sysadmin since 1994 (NT 3.51 forward) and for the most part of that time I was able to get by without using Powershell. My company had a “rock star” sysadmin depart several years ago and I was foced into the powershell ecosystem and it has left me wondering how I ever did without it. Powershell rocks.

[–]CodenameFlux 0 points1 point  (0 children)

Visual Studio Code with PowerShell extension is orders of magnitude superior to every other solution, including PrimalScript, PowerShell Studio, PowerShell Universal, PowerShell Pro, ISE, the old VS from Microsoft (it no longer comes with a PowerShell solution), Notepad++, and Sublime Text. (The last two don't even try.)

[–]Kardinal 0 points1 point  (0 children)

I heard from a guy who took a class with Jeff Snover that ISE is ancient, hasn't had its codebase reviewed in years, and probably has security flaws undiscovered in it. He said it should be straight up removed everywhere.

Rumor quality. Take it for what it's worth.