Earlier quoted context omitted.
Objects are discoverable in powershell. Enter the object, and lists the object out as text.
Yes, this is so awesome. Can't remember the exact parameter/field? Just dump it to the console.
PowerShell is open sourced and is available on Linux
81–90 of 790 posts
Re: PowerShell is open sourced and is available on Linux
#82Is this actually useful? I always thought powershell was largely just for interacting with windows components, like installing an msi or talking to active directory. What would you actually practically use this for on a linux box?
Scripting. While I typically use Bash on Windows to use grep to interactively test my webserver, I'm much happier using Powershell ISE (which I don't know was ported [1]) to write standard tests with multiple parts, particularly ones that require e.g. checking cookies on the response. 1. Looks like they ported a service that does the same. https://github.com/powershell/powershelleditorservices
Powershell instead of using grep? Or as a testing framework? Or an embedded interactive REPL?
I mean, just broadly, with basically zero knowledge of powershell, what I see is a custom scripting language with a set of common 'macro' commandlets that do little tasks.
...but, I don't see how that's useful?
How do you import a package to upload a file to S3?
I can't just install https://aws.amazon.com/powershell/ right? ...because that's not ported? So...? etc. etc. for other practical tasks.
Not trolling; just genuinely curious what actual tasks are actually supported that you could actually use this for, beyond trivial stuff like 'check if file exists'?
Re: PowerShell is open sourced and is available on Linux
#83PowerShell is my guilty pleasure of the computing world. Once you've piped strongly-typed objects around between your shell commands, text scraping seems barbaric by comparison. The problem, of course, is that you can't use all that power for much, since the pool of PS-compatible tools and utilities is much shallower than it is for Unix shells. I'm really hoping this will help spur a new wave of PowerShell-compatible…
I love the strongly-typed cookies but I absolutely hate the powershell syntax. It's like C# and Bash got together and had a really ugly baby.
Re: PowerShell is open sourced and is available on Linux
#84Re: PowerShell is open sourced and is available on Linux
#85Earlier quoted context omitted.
Which is why I have no doubt the Universal Windows Platform will become the Universal Platform and be a true desktop/tablet/mobile/server/etc Java competitor on all major OS (mobile, traditional and server). It must be rather frustrating for Microsoft to look back a decade or more and see they were sitting on the exact technology a hell of a lot of people said would be their future had they made it cross-platform fro…
But that's what .NET wanted to be. That's what Silverlight wanted to be.
Re: PowerShell is open sourced and is available on Linux
#86Gates pioneered copyright protection for source code. Ballmer said Linux is cancer. This company has betrayed its own values. Actually it hasn't. The strategy is always the same: destroy the competition. Undersell. Even give away software for free. Whatever it takes. Money to burn. What's interesting is that they see the UNIX shell, which has long been open source and free, as competition.
I'll join in on the Microsoft bashing club when every other major corporation gets bashed the same way by devs. The day that will happen is when socialism makes more sense to people than capitalism, and it becomes a pervasive idea, but sadly, I think that day won't be coming around any time soon.
Until then, let's enjoy the fruits of capitalism.
Re: PowerShell is open sourced and is available on Linux
#87 get-childitem | ConvertTo-Csv
get-childitem | ConvertTo-Json | ConvertFrom-Json | ConvertTo-Csv
It seems like, if there's a perfect underlying data model doing what's effectively an identity conversion shouldn't change anything.Edit oooo, and all the linux stuff is available within it too. So you can run this to just augment your linux experience.
ls | grep '_' | ConvertTo-JsonRe: PowerShell is open sourced and is available on Linux
#88Gates pioneered copyright protection for source code. Ballmer said Linux is cancer. This company has betrayed its own values. Actually it hasn't. The strategy is always the same: destroy the competition. Undersell. Even give away software for free. Whatever it takes. Money to burn. What's interesting is that they see the UNIX shell, which has long been open source and free, as competition.
Re: PowerShell is open sourced and is available on Linux
#89PowerShell is my guilty pleasure of the computing world. Once you've piped strongly-typed objects around between your shell commands, text scraping seems barbaric by comparison. The problem, of course, is that you can't use all that power for much, since the pool of PS-compatible tools and utilities is much shallower than it is for Unix shells. I'm really hoping this will help spur a new wave of PowerShell-compatible…
Is this really so useful in practice? I have never used PowerShell before (nor do I have plans to do so in the near future), but I would imagine the downside is complexity, both for user and especially for developers. With text you just read and parse, while with objects you need to know the object type, its fields,... Whatever happend, I hope text stays here (and I have a bad feeling about it ever since I met system…
parsing is actually a huge pain in general. a lot of unixy tools produce different output when their stdout is not a terminal to be more pipeline-friendly. That output is generally easier to parse (often tab-separated or so), but you still need to know the same things about the output (the "type" could be whether it came from `ps` or from `ls`, and the fields are just in some static order that was usually chosen decades ago, and if it's extensible it's cumbersome).
If `ps`, `ls`, etc produced typed output, I would be sooo happy.
When I worked at google I thought about what it would be like to have a unix userland where all the parts communicate with protobufs instead of raw text. There are some problems (like portability of message definitions, which was a solved problem within google, but which is harder when you have multiple parties/entities/companies contributing message definitions).
edit: accidentally a word
Re: PowerShell is open sourced and is available on Linux
#90Earlier quoted context omitted.
Objects are discoverable in powershell. Enter the object, and lists the object out as text.
Ok, that sounds good. But what if some developer decided that some field would have prefix "ABC" in all values, then the value I am interested in, then some value I am not interested in at the end? (you say this can't happen? Clue: WMI.) Can I take the value, convert it to string, make some magic on it and convert it to another object entirely? I don't know, I never had any problems with text parsing. I love strong t…