8 ms·
This is an off topic, but I just learned from the article that PowerShell will soon be the default in place of cmd.exe in Windows 10. I welcome this change as I
by yokohummer7 10y ago
This is an off topic, but I just learned from the article that PowerShell will soon be the default in place of cmd.exe in Windows 10. I welcome this change as I found the experience of using PS was superior to that of bash/zsh in general cases.
But I hope they figured out the performance problem. As of writing, in the stable version of Windows 10, PS is perceptually slower than cmd, so I was forced to use PS only when needed. Funnily it was even slower in Windows 8, so the current affair is better than ever. But to be truly a default I think the performance of PS should at least match that of cmd.exe.
- tonyedgecombe 10y agoPowerShell needs the .Net runtime so I doubt it will ever be on a par with cmd.exe.
- pjmlp 10y agocmd.exe has a limited set of builtin and relies on external applications with a plain text interface. PowerShell has builtins, can import code from any .NET Assembly or native code DLL, invoke external processes, full featured programming language and structured data. cmd.exe will never be on par with PowerShell.
- efdee 10y agoGP was replying to a comment about the performance of PS compared to cmd.exe, stating that PS could never be on par with cmd.exe because it needs to load more.
- stinos 10y agoYeah this is the one thing with PowerShell: with great power comes, erm, not so great performance. I've never been a full-time shell user so after years of occasionally getting some stuff automated using bash discovering Powershell really was like a breath of fresh air.. No more trying/failing to come up with the correct regex to parse the plain text spit out by tools. Command-line completion of arguments. A whole bunch of sane defaults and command names making things easy to discover. Etc. Now at first I only ran PS on a beefy workstation and didn't notice it was kinda slow (even for common operations). But on not-so-beefy machines: yeah, not nice. Then again, cmd is worthless in comparsion with PS so I stopped caring. Thing is also: the time gained by how fast I can get stuff done in PS probably makes up for the time lost trying to figure out the weird syntax of other shells, especially cmd.
- chmln 10y ago> the experience of using PS was superior to that of bash As a Linux dweller, I'm genuinely curious about this one. I've found PS inferior in just about any use case.
- thomas11 10y agoI've used both extensively and I think they are fairly different, with different strengths and weaknesses. Bash is more pragmatic and more concise on the command line. PS is more uniform in its design and nicer for scripting IMO. It allows passing objects through pipes, has built-in JSON reading and writing, built-in parameter handling with defaults, mandatory and optional params, switches etc., and such niceties.
- majkinetor 10y agoBash is not more concise, its other way around, of course, if you use default aliases. The reasons is logical - you almost never use text parsing in Posh while you almost never have anything without it in bash.
- AsyncAwait 10y agoI find Powershell non intuitive to learn honestly, Bash just clicks with me way more for some reason.
- majkinetor 10y agoI used majority of mainstream shells and Posh is a scpace ship compared to any other in existence. I wont reiterate again and again why, there are planty of places eihter on HN, reddit or SO why is it so. I guess you will have to give it a serious try.
- jciochon 10y agoI go back and forth between windows/unix for my day job and I also would be curious on any actual bullet points. I find that even in a situation where PS could potentially prove more useful or has an extra feature, what you end up with is a new set of chrome tabs open just to try and figure out how to do the thing. I suppose this might(?) be mitigated if you're embedded in the .NET world, but I just can't seem to get the memory down for the silly cmdlet naming and since they also have the admittedly interesting object-piping thing going on, you're always battling two pain points at a time instead of just one (e.g. syntax/naming in bash)
- majkinetor 10y agoYeah, the new Powershell will be very fast AFAIK. They had to do it because nano server was starting faster then Posh which was ridiculous.
- rubber_duck 10y agoOn that note if you are a .NET developer you owe yourself to learn PS and how to write cmdlets, it's such a powerful and easy way to expose a CLI for your .NET app compared to stdio and command line arguments parsing - it's incredibly powerful and trivial to do. Unfortunately most .NET devs are programmers who grew up with VB, RAD and GUI tools they don't understand the value of exposing UNIX like small functionality CLI commands over big monolithic services, GUI apps, etc.
- chadgeidel 10y agoI've been dabbling with PS (using it as my primary console) but my workflow just isn't that complex, so I don't have a compelling reason to write cmdlets (yet!). Can you recommend a good tutorial?
- rubber_duck 10y agoI've used MSDN docs but I wouldn't call that a tutorial :)
- Sacho 10y agoThe msdn docs are great, it's just difficult to navigate them. Perhaps this would help? https://msdn.microsoft.com/en-us/library/dd878294(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/dd878294(v=vs.85).a... There's tutorials in there as well, but I didn't find them very useful compared to the overview/concepts documentation.
- rubber_duck 10y agoYeah that's what I went trough as well but usually tutorials are shorter and more to the point, this is more reference/in-depth style - I'm guessing OP was looking for something along those lines.
- flukus 10y agoI'm a .net developer, I still install cygwin/bash on my computer because I can write stuff quicker and better. PS get's incredibly verbose for anything non trivial. I learned powershell long before bash too.