It's not good for programming or scripting. There are so many good ideas in PowerShell but it's wrapped in a weird body.
It's not good for programming or scripting. There are so many good ideas in PowerShell but it's wrapped in a weird body.
At least, it doesn't insult you like Ansible tooling with the ^ YOU MADE A MISTAKE HERE BUT WE CAN'T BE CLEAR WHAT IT IS
It's such a shame powershell didn't come 2 years later, I feel like they'd have had no choice but to use C# instead of inventing a new language.
It's worth noting that all code in .NET is enclosed within a type (at a fundamental level .NET code is either contained within a value type or reference type, but knowing those names isn't important when you're starting out), so this doesn't limit you to creating/importing data types, you can use it to write inline C# functions too.
It's also interesting to note that the .NET Framework comes with its own .NET compiler, so you don't need to install any dev tools on Windows to code in C#, it's possible to do so with the tools that are available out of the box.
If you want to try out referencing C# code using Add-Type, the following article is a good introduction:
https://blogs.technet.microsoft.com/stefan_gossner/2010/05/0...
When you look at how admins get their job done, it starts in the interactive shell and then when the do things frequently, they put it into a simple script and when then need it to be more formal, they invest in making it production quality.
That is the flow that PowerShell was designed to support.
Jeffrey Snover [MSFT]
I can't pinpoint what I like so much about it either... It just draws me in well. It does devolve in readability when trying to squeeze out every drop of speed, though.
IPC is what I find to be the most challenging for me in PoSH, but I'm not sure if that's due to incompetence.
Jeffrey Snover [MSFT]
If these are flavors of ice cream, they're all pretty similar and taste good. Where is Powershell in this? It's certainly not vanilla or chocolate... it's more like pepperoni. It's like C# and Perl had a really ugly baby. Even simple things like using -eq and -ne for comparisons seems 40 years out of date.