by criddell · 10y ago · 0 comments
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.
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.You mean bazaar. Nice typo though.