News for hackers. Stuff that matters.
Re:The Mac Pro Lives by mort96 on Tuesday April 04, 2017 @06:26PM (#14037824)
I find it hard to take powershell seriously, considering last time I tried using it for anything, I just wanted to quickly download something over http. Looked for something like 'wget <URL>' online, the only results I found was something like multiple verbose lines of instantiating an http client and calling methods on it. That's fine for a programming language, completely horrible for an everyday shell, from the perspective of someone who generally only uses Firefox and a terminal emulator in Linux.

After some googling just now, it seems like there's now an Invoke-WebRequest command, but that too looks like a hell of a lot of typing compared to Linux shells.

There's also the fact that lots of stuff in windows wasn't designed to be accessible through the cli. You can't, for example, make a powershell script to toggle an audio output device on and off, as that's only available through the GUI.

Re:The Mac Pro Lives by yokohummer7 on Tuesday April 04, 2017 @07:29PM (#14038258)
> the only results I found was something like multiple verbose lines of instantiating an http client and calling methods on it.

I blame the documentation. Not the official documentation (they're not excellent, but OK), but various outdated resources residing in many blogs and sites, including Stack Overflow. I mean, what's wrong with

  iwr REMOTE_URL -o LOCAL_FILENAME
? The situation this command wasn't searchable by you is unfortunate, possibly because PowerShell has come a long way since its introduction in 2006 and it is hard to remove the outdated resources online. But for those who know what features/commands are available in PowerShell, finding them isn't particularly difficult.

> There's also the fact that lots of stuff in windows wasn't designed to be accessible through the cli. You can't, for example, make a powershell script to toggle an audio output device on and off

This is just one example. On the other hand, I found nearly every thing I had done using GUI could be replaced by a few lines of PowerShell code. Actually automating my day-to-day GUI operations was my way to learn PowerShell, and mostly it worked great. Microsoft is adding tons of commands each release to expose more system functionalities. There are exceptions of course, but "lots of stuff" is a bit exaggerated.