The PowerShell Team Blog is Microsoft's official blog for PowerShell releases, roadmaps, and features like PSReadLine and Out-GridView.
HN commenters praise PowerShell's object pipeline and tools like PSReadLine and Out-GridView, and link the blog for verb-noun naming history.
Select-Object is for head/teal as poster mentioned that.
> You cannot use linux tools in PowerShell in most cases, since they aren't installed by default.
The same as jq and specific variants of tools you mention. Not like you can't install them in single line: winget/choco install awk,grep,jq,less...
> In the real world a lot of shell scripting requires parsing unstructured text from various command outputs and files.
No it doesn't. I do shell scripting for more then decade in PowerShell and I can count how many times I parsed the text. The most used one is simple split like with `$paths = $Env:PATH -split ';|:'`, but other then that no. I used select-string only couple of times in decade, on all OSes.
> but as soon as you step out of that comfort zone it becomes awkward to use.
That is true for literary anything. Actually pwsh does great with 'native' tools too, and there is even MS module to help with "native app wrapping". See [1] and [2]
Today its more or less regular to have json output which can be trivially read by pwsh ConvertFrom-Json
[1] https://devblogs.microsoft.com/powershell/native-commands-in-powershell-a-new-approach.
[2] https://redmondmag.com/articles/2020/12/11/powershell-crescendo-preview.aspx
MSVC's C++ Parallel algorithms library gets close [1], and so does Rust's Rayon crate [2]. C# has parallel for loops [3], and apparently so does PowerShell [4]
Though none of these are quite as convenient as I think they could be. I suspect there is a path for Rust to add parallel iteration syntax in the future [5]. There are quite a few steps needed to get there, but the result could look something like this:
let mut listener = TcpListener::bind("127.0.0.1:8080")?;
println!("Listening on {}", listener.local_addr()?);
par for stream? in listener.incoming() {
println!("Accepting from: {}", stream.peer_addr()?);
io::copy(&stream, &stream)?;
}
[1]: https://devblogs.microsoft.com/cppblog/using-c17-parallel-algorithms-for-better-performance/
[2]: https://docs.rs/rayon/1.5.0/rayon/
[3]: https://dotnettutorials.net/lesson/parallel-for-method-csharp/
[4]: https://devblogs.microsoft.com/powershell/powershell-foreach-object-parallel-feature/
[5]: https://blog.yoshuawuyts.com/parallel-stream/#future-directions
PowerShell runs on Linux. I run PS as my primary shell [0] on Linux today. It's is open source too.
You're not far away with how PowerShell can parse Linux commands. Instead of relying on awk/grep, PowerShell uses .NET under the hood to provide consistency across operating systems. There are a few methods for converting from a Linux command to PowerShell objects based on delimiters or OFS. If you're interested, Steve Lee wrote a blog post that does a good job covering how to parse Linux command output into PowerShell objects [1].
[0] https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1
[1] https://devblogs.microsoft.com/powershell/parsing-text-with-powershell-1-3/
This is one of the best modules for PowerShell and has been included by default since v5.1. I love the tab completion support and syntax highlighting it offers interactively and has immensely improved the usability of PowerShell since it was introduced. The default key bindings and settings may not be what some different shell users like but it is quite versatile and can be configured to be more like other shells to suite your preferences which is nice.
I’ve yet to really try out the newly introduced predictive text settings [1] but it seems quite powerful from the demos I’ve seen.
[1] https://devblogs.microsoft.com/powershell/announcing-psreadline-2-1-with-predictive-intellisense/
Powershell is the ultimate expression of the Unix pipeline imo.
Passing objects through the pipeline and being able to access this data without awk/sed incantations is a blessing for me.
I think anyone who appreciates shell pipelines and python can grok the advantages of the approach taken by Powershell, in a large way it is directly built upon existing an Unix heritage.
I'm not so good at explaining why, but for anyone curious please have a look at the Monad manifesto by Jeffrey Snover
https://devblogs.microsoft.com/powershell/monad-manifesto-the-origin-of-windows-powershell/
You may not agree with the implementation, but the ideas being it, I think, are worth considering.
There are enough examples of companies doing terrible stuff that concerns are entirely understandable.
Let me take the opportunity to say:
1) YOU ARE NOT OUR PRODUCT!
2) Our goal is to use telemetry to help us make better decisions about what will help our customers (as with with projects, only a subset of users are active in our community feedback process)
3) We are super open about the telemetry (including going through the PowerShell community review process) and publish all the data.
More details here:
https://devblogs.microsoft.com/powershell/new-telemetry-in-powershell-7-preview-3/
Here is all the telemetry: https://aka.ms/psgithubbi
Jeffrey Snover [MSFT]