Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Honestly this is half the reason I use Powershell for everything. Bash-like experience but everything returns objects.

It's a messy, hairy, awful language. Consistently inconsistent, dynamically-typed in the worst ways, "two googles per line" complexity, etc.

But for the convenience of being able to combine shell-like access to various tools and platforms combined with the "everything is a stream of objects" model, it can't be beat in my experience.

And you can still do all the bash-like things for tools that don't have good Powershell wrappers that will convert their text-streams into objects. Which, sadly, is just about everything.



I love this comment, measuring complexity via googles/line. That really sends home how difficult it is to grok PowerShell.

What are you building with it that would be harder in bash or another shell? I'm not seeing the value of passing around opaque objects instead of text.


The objects aren't opaque, you can catch them in a variable and inspect it with get-member. I find it very nice to work interactively when developing a script -- call a getter command and either let it out to the console or store it in variable and then play with the variable.

Jason/XML/csv files and API results all get turned into PS objects easily, as do things with config objects like file permissions or SQL servers or whatnot. There's a bunch of dumb ideas like non-file filesystems for things like SQL and the Windows Registry, but the basic concept of "call command-line tools and navigate the filesystem with the ease of Bash, but also work with objects like Python or JS" works well for me.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: