Hacker News new | ask | show | jobs
by folbec 2112 days ago
The 4 things I love most in Powershell, from the point of view of a maintainer of scripts, is the relative verbosity of commands (at least I don't have to go hunting for obscure acronyms, or recursive puns such as yacc, when I read code), auto-completion an auto-documentation of scripts (when I have to change something), and object pipe (as a maintainer I hate awk and regular expressions in general).

Only defect is they did not go with Yoda speak (Get-<TAB> is a much worse filter that NetA<TAB> to search for Get-NetAdapter for instance).

It's still a bit green on Linux environments, but it already beats many of the alternatives.

4 comments

You know, it's funny, the topic in this article is the forced abandonment of VMS.

Microsoft at one time had a video interview on their "Virtual Academy" with one of the PowerShell creators, and he talks about how they kept trying to create a "unixy" tool for managing Windows machines, and it never felt or worked right. So then they looked at VMS and realized it was the perfect inspiration.

Most of what you love about PowerShell comes from VMS.

Which also shouldn't be surprising given VMS also had a huge inspiration (and some key figures) on early NT Kernel development. In some ways modern Windows is "son of VMS".
Friend of mine's company guy bought because they had an Ethernet solution for VMS. The company that bought them wanted it ported to NT. He said it was 'almost trivial'
I agree completely. Powershell is a pleasure to write in and read and the various modules for managing different services makes my life way easier.

For anyone who's been put in charge of managing Zoom for their organization, may I recommend: https://github.com/JosephMcEvoy/PSZoom

> the relative verbosity of commands (at least I don't have to go hunting for obscure acronyms, or recursive puns such as yacc, when I read code)

"yacc" is not a command. It's an executable file that's read and executed. In fact, most of the things in a shell script are not commands, but files that are loaded and executed. If someone built a shell with everything built in it'd be a bloated monster full of inconsistencies and incompatibilities.

OTOH, PowerShell has "commands" or aliases named after Unix executables, such as "curl", that don't replicate the switches one would expect from the curl program.

> It's still a bit green on Linux environments, but it already beats many of the alternatives.

Maybe for Windows transplants. In general, not at all.

> Maybe for Windows transplants. In general, not at all.

care to elaborate

In my experience, Powershell is so much nicer than bash that even on my work mac I tend to use it when doing stuff for me (not going to force it on my team)

Powershell originated on Windows and garnered a fan base on the platform. It's not much appreciated outside that niche and most people who like it are people who use or used it on Windows.
I get where you are coming from

I find it odd that you consider Windows and PowerShell a niche, when it seems to have been enthusiastically embraced by the community

yacc is not a recursive abbr, it stands for Yet Another Compiler Compiler.