If ($Number -gt 0)
That's just one example. There is a lot of really confusing stuff in powershell that's entirely unnecessary. There were going for some kind of Bash-shell familiarity which, oddly enough, most Windows developers don't even have.MS also tried to improve PowerShell by installing the PSReadLine module by default.
Read https://github.com/lzybkr/PSReadLine for instructions on how to make PS a bit more usable.
Windows servers are a dying breed and Microsoft knows it, they've lost that war and are quickly porting everything they can to run on Linux including their .Net runtime and Sql Server; they know they've lost the war, it's only a matter of time.
You mean bazaar. Nice typo though.
Generally though, the syntax is different but once you learn it, it's mostly fine and sometimes the text-based nature of Unix commands means you have to do a lot more reg-exing.
For example, compare these two:
ps -ef | grep "chrome" | awk '{print $2}' | xargs kill
vs ps -name chrome | kill
Of course it's just a matter of preference, but I prefer the the PowerShell version.> and sometimes the text-based nature of Unix commands means you have to do a lot more reg-exing.
That's a feature that has far more upside than downside.
My point still stands. They are different but (IMHO) both excellent. Ubuntu on Windows may eventually reach parity with PowerShell but until then, PowerShell is worth knowing (especially if you follow Microsoft's advice and run servers without the GUI installed).
I agree its a crappy language, but remember, it's a shell, not a language. It serves a different purpose than being good for pure code, so saying something like "<your favorite scripting language here> is better than bash" doesn't hold a whole lot of water. It is way better than batch though.