back to article Microsoft's cmd.exe deposed by PowerShell in Windows 10 preview

Taking timeworn advice for authors to "murder your darlings," Microsoft is seemingly nudging the classic Windows Command Prompt toward the slaughterhouse door. The newly released Windows 10 Insider Preview Build 14971 for PC has made PowerShell the default command line tool, a promotion that coincides with PowerShell's 10-year …

  1. Nate Amsden Silver badge

    Wouldn't want a power shell

    Any more than I'd want a perl shell.

    I'm sure it makes a fine interpreter but as a shell it has always sounded pretty terrible. I say sounds because I've never spent more than a minute or two at a time in powershell.

    Windows does have the disadvantage of having to deal with objects like the registry instead of text files. Some may like that approach more but if course isn't for everyone.

    My favorite native shell for Windows dates back maybe 20 years.. 4NT. And for dos 4DOS. Fond memories of both. I use cygwin these days though my usage is pretty limited to a dozen or two commands. 98% of my computer time is in linux

  2. Pompous Git Silver badge

    Re: Wouldn't want a power shell

    My favorite native shell for Windows dates back maybe 20 years.. 4NT. And for dos 4DOS. Fond memories of both.
    Props for that :-) Mostly I get blank looks when I mention them.

  3. billdehaan

    Re: Wouldn't want a power shell

    4NT is still around, though it's called Take Command, now.

    You can get it at www.jpsoft.com. There's a freeware lite edition called TCC/LE that is highly recommended.

    I've been using 4DOS/4OS2/4NT/TCC since 1989 or so, almost 30 years. Bash is all well and good on Unix and Linux boxes, but on DOS/OS2/Windows boxes, I find I can do more faster, and easier, than with TCC than bash or other ported Unix based shells.

  4. itzman
    Coat

    Re: Wouldn't want a power shell

    "dates back maybe 20 years.. 4NT."

    Is that Blackwood?

    (I wonder how many will 'get' that)

  5. Lodgie

    Re: Wouldn't want a power shell

    Think it's ACOL.

  6. Lodgie

    Re: Wouldn't want a power shell

    Definately a force rather than an invite to a slam...

  7. asdf Silver badge
    Trollface

    ksh or nothing, thank heavens for cygwin

    Lets see type set -o vi and get Parameter cannot be processed ... You call this a shell? Even hairball extraordinaire bash can handle that.

  8. find users who cut cat tail

    Re: ksh or nothing, thank heavens for cygwin

    People who want a real shell are probably already using one.

    People who use the command line sporadically (or visit MS Windows sporadically) will not notice anything (the better case) or be confused and annoyed because of things they learned inexplicably breaking (the worse case).

    People who really like PowerShell (whoever they are) have already figured out how to use it.

    So who will benefit? Dunno.

    The list of of things PowerShell can do sounds to me a list of things ‘Why the hell a *shell* should do that?’

  9. Mage Silver badge

    Re: ksh or nothing, thank heavens for cygwin

    Yes, this change is arrogant as all that want Power Shell are using it.

    " It can, for example, pipe not just text but objects, as well. It can manage the Windows registry and Windows Management Instrumentation. It can batch rename files. It can read a list of users in an Excel file and automatically add them to an Active Directory group."

    I'll grant that the regular shell probably just pipes text, but I think you can do all the other stuff without powershell.

    ---

    Piping objects sounds a little dangerous, like Active X in a Web Page, or DCOM, or even the original OLE / COM. IMO the only place for an "Object" is in the program that created it, anything else is a reliability and security horror. OLE/Com was a bad idea. DCOM and Active X in Web pages are evil.

    Also embedding a Visio or Excel or something might seem clever and useful till you email the Word Doc to someone that only has Word. There are better ways to transfer content between Apps than the MS way.

  10. Dan 55 Silver badge

    Re: ksh or nothing, thank heavens for cygwin

    Batch rename has been around forever. It's one of the few things that the old cmd was good at. Easier than faffing round with a for and sed on Unix.

  11. RS232 4 Eva

    Re: ksh or nothing, thank heavens for cygwin

    Normal users will benefit because they'll become more familar with a shell that's both more powerful and easier to use (logical command names, aliases for commands, built-in consistent help).

    It will also benefit existing PowerShell users because they'll be able to right-click in file explorer to open up PowerShell.

    Plus, anyone who doesn't like it can just turn the setting off to switch it back to command, like you can already do for the <Win>+X menu.

  12. RS232 4 Eva

    Re: ksh or nothing, thank heavens for cygwin

    "Piping objects sounds a little dangerous, like Active X in a Web Page, or DCOM, or even the original OLE / COM. IMO the only place for an "Object" is in the program that created it, anything else is a reliability and security horror. OLE/Com was a bad idea. DCOM and Active X in Web pages are evil."

    PowerShell is just using .Net objects. It's no different than one .Net app calling a .Net API. The idea that passing unstructured text around is the best solution for anything is just bizarre.

  13. Anonymous Coward
    Anonymous Coward

    Re: ksh or nothing, thank heavens for cygwin

    "The idea that passing unstructured text around is the best solution for anything is just bizarre."

    Not really. Well, really really not really for Windows CMD.exe. Let me explain...

    We all know BASH can't handle binary data due to how Unix/C handles null. However, there is all kinds of tools available to BASH to take care of that processing. With Windows CMD, these tools are extremely limited or they just do not exist. Honestly, besides copy /b, what else does CMD have available to it for binary data?

    Objects aside, even the simplest things in BASH are extremely cumbersome in Windows CMD. For instance, null terminated lines! In BASH you'll just use a tool like 'find' and have all lines null terminated. In Windows CMD, good luck!

    Is Powershell a upgrade to CMD.exe? Absolutely. Is Powershell the best alternative? No, I think it never has been. Truthfully in my opinion, with so many shells and languages today that are better than Powershell, I can't help to think that advertising CMD's replacement with Powershell as a struggling effort to win BACK people who have already have been accustomed to many OS's that are not Windows.

    First things I have done returning to Windows for _SOLELY_ running Photoshop...

    1. Enable Hyper V

    2. Install Docker

    3. Forgetting Windows for anything other than Photoshop.

    P.S. If anyone knows how to run 10-bit color for usage in Photoshop that does NOT require running Windows as the host OS, please, please let me know! I've tried all the popular VM's and other virtualizers out there without luck. Being I'm not a "VM" guy, I'm hoping there is a way to NOT virtualize GPU hardware but still virtualize everything else...or something...anything.

  14. Anonymous Coward
    Anonymous Coward

    Re: ksh or nothing, thank heavens for cygwin

    The problem is exactly .Net. PowerShell is heavy, slow, and Windows in not a .Net application, so everything that goes down to the OS usually needs to go through the usual PInvoke or the like that slow down everything even more.

    There's a reason why administering Windows, Exchange and SQL Server became an exercise in patience while PowerShell cmdlets are called, and it's going to and from all those useless and slow .Net code. Even opening and inspecting the Event Viewer became a pain since it was moved to XML and .NET.

  15. Anonymous Coward
    Anonymous Coward

    Re: ksh or nothing, thank heavens for cygwin

    "The problem is exactly..."

    So, the environments overhead? Kind of makes you think that the problem isn't Powershell, but maybe the OS being used...

  16. Anonymous Coward
    Anonymous Coward

    Re: ksh or nothing, thank heavens for cygwin

    "People who really like PowerShell (whoever they are) " - they're over there in the corner, sharing a Twix.

    Joke. Err ..

    More seriously, msg to Microsoft: stop making new changes until you've fixed the existing issues.

  17. P. Lee Silver badge

    Re: ksh or nothing, thank heavens for cygwin

    >‘Why the hell a *shell* should do that?’

    Because its interactive VisualBasic for Applications?

    Ok, I'm talking well outside my skill-set here and I'm happy to be shot down for that comment, but there is a more interesting philosophical point in play.

    I'm sure it will be great for manipulating MS applications & data. What happens with 3rd party apps? This is why *nix people like tools for handling "unstructured" text - it allows us to get at the data and do things the application writers never imagined, or more likely these days, what they did imagine but didn't want you to do.

    I don't need application skills, I don't need api skills, just dump the data and I'll mess with it as required. Look at how MS use powershell - to create applications their own applications. If you don't go for the whole .net thing, you'll still need some alternative and perhaps other languages do that better.

    We are basically heading to a situation where no-one trusts the ecosystem so everyone wants to own the whole stack. First they went to linux appliances, then they went to renting via SaaS. Given MS' keenness to kill on-site servers, I suspect powershell will become "Azure Powershell for MS applications" as everyone who is not Azure-only is unlikely to invest in these interfaces.

  18. Anonymous Coward
    Anonymous Coward

    Re: ksh or nothing, thank heavens for cygwin

    I just .Realized how the dot .Prefix interferes with reading because it's what us meatsacks use to indicate the .End of a sentence. I'm willing to wager the shell itself .Behaves similarly.

  19. patrickstar

    Re: ksh or nothing, thank heavens for cygwin

    It's pretty trivial to write PowerShell modules and cmdlets to expose your functionality.

    Nowadays it's considered part of writing a good, manageable, Windows application, just like having an ARexx port was in the Amiga days.

    And in the case of legacy stuff or stupid devs, PowerShell does pretty OK with text processing as well (it's more or less based on Perl after all). So, in the worst case you end up with something comparable to a *ix shell or scripting language. In the best case you end up with something vastly more powerrful and suited to the Windows environment.

  20. david 12 Bronze badge

    Re: ksh or nothing, thank heavens for cygwin

    >Normal users will benefit because they'll become more familar with a shell

    In the same way that they benefit from having a powerful shell language in Word and Excel?

    >PowerShell is just using .Net objects.

    Powershell is just using COM objects. That is, if you actually want to do anything like manipulate Excel, or alter the registry, or "update Active Directory from Excel", its all COM objects.

  21. Anonymous Coward
    Anonymous Coward

    Re: ksh or nothing, thank heavens for cygwin

    "Batch rename has been around forever. It's one of the few things that the old cmd was good at."

    Presumably they mean batch rename as in "here's a list of file names, here's a list of the names I want them to be". Like taking Track01.mp3 - Track10.mp3 and renaming them 01-Title.mp3 etc (terrible example, I know there are better ways for that instance)

  22. lameduck007

    Re: ksh or nothing, thank heavens for cygwin

    I just got a Photoshop setup using qemu-kvm and libvirt on Ubuntu.

    The ( Radeon ) video card control is passed through to windows , which needs the Radeon driver to work.

    It's blacklisted in linux , there's no emulation going on.

    Is that what you need ?

  23. Hans 1 Silver badge
    Windows

    Re: ksh or nothing, thank heavens for cygwin

    Batch rename, yes, good.

    On UNIX you have the rename command, some take a regular expression, ala sed ... bliss.

    I am amused the author does not know reg.exe or wmic.exe ... those with backticks & tokens can get you quite far in cmd.exe.

    I favor find with -exec for renaming when it is simple, else file-list | sed | shell ... if a proper rename is not available ...

    PowerShell is definitely better than cmd.exe in every possible way I can think of, no, you are not dreaming, I wrote that ... if you have to manage windows boxen, I think you will quickly realize PowerShell is a must, steep learning curve, YES, but definitely worth every second of your time spent learning it ... ;-) ... it has its quirks, like any other piece of software, but it gets the job done for poor sods having to manage Windows boxen. You should retire cmd.exe/vbs logon scripts and use that, and you should, imho, use powershell instead of cmd.EXE interactively whenever possible ... it just gets more stuff done, less time fighting weird behavior of cmd.exe and some of its commands ...

  24. phuzz Silver badge

    Re: ksh or nothing, thank heavens for cygwin

    Powershell can still deal with flat text files in exactly the same way you can in bash, but because it mainly deals with structured data, it's a lot easier to deal with for someone who hasn't spent twenty years using unix.

    Say you're writing a script that will output the IP of the current machine, in bash you'd pipe the output from ifconfig through a grep and a cut or two (after thinking carefully about all the possible outputs and how they might break your regex), in Powershell you'd just reference (Get-NetIPAddress).IPAddress .

    If you've spent years working in *nix shells then I'm sure the first seems easy to you, but to someone from the outside, you're taking a number, turning it to text so it can be output from ifconfig, then taking that text and chopping it up to get back to the number you want to use. Why not just use the number directly?

  25. Doctor Syntax Silver badge

    Re: ksh or nothing, thank heavens for cygwin

    "Say you're writing a script that will output the IP of the current machine, in bash you'd pipe the output from ifconfig through a grep and a cut or two (after thinking carefully about all the possible outputs and how they might break your regex), in Powershell you'd just reference (Get-NetIPAddress).IPAddress ."

    Or

    hostname -I

  26. Anonymous Coward
    Anonymous Coward

    Re: "a script that will output the IP of the current machine"

    "a script that will output the IP of the current machine"

    Gordon bennett, there's your first problem right there.

    Machines don't have IP addresses, *interfaces* do, and on any given machine there are likely multiple software-visible interfaces even if there's only one actual LAN connection.

    Does PowerShell understand that for you?

  27. patrickstar

    Re: "a script that will output the IP of the current machine"

    Get-NetIPAddress returns the addresses of all interfaces that have one. You can select a specific interface either by supplying arguments to it or by filtering the output afterwards. See https://technet.microsoft.com/en-us/library/hh826136.aspx

  28. el_oscuro

    Re: "a script that will output the IP of the current machine"

    4NT has a lot of builtin environment variables for stuff like this, i.e: %_IPADDRESS

  29. Trixr

    Re: ksh or nothing, thank heavens for cygwin

    I'm no Mac fangirl, but frankly, if you detest windows so much, why on earth aren't you running PS on a Mac?

    It sounds like your environment is virtual, but there's workarounds for installing a Mac guest.

  30. asdf Silver badge

    Re: ksh or nothing, thank heavens for cygwin

    >I'm no Mac fangirl, but frankly, if you detest windows so much why on earth aren't you running PS on a Mac?

    Not sure if was at me the original poster but my answer is because that is not what work bought me and these days since you have to pay me to use windows (especially since Microsoft is moving to the Google trojan horse business model) and even then I am going to use *nix tools as much as possible to get the job done because those are my weapons of choice.

  31. bombastic bob Silver badge
    Facepalm

    Re: ksh or nothing, thank heavens for cygwin

    "The list of of things PowerShell can do sounds to me a list of things ‘Why the hell a *shell* should do that?’"

    ACK

    Power-hell was developed [read: excreted] by Micro-shaft to promote their ".Not"tiness embedded in every OS after XP. But the server OS's were the worst. Win2k server ran on a PI with 32Mb of RAM. All versions since then have gotten piggier and piggier, thanks to ".Not".

    Micro-shaft TOTALLY screwed the pooch with the ".Not" excrement. And their Power-hell is yet another attempt at cramming it up our collective backsides, more painfully than 19 feet of curari-tipped wrought-iron fence [and without the KY to assist with the jammin'].

    ".Not" was the beginning of what went horribly, horribly wrong at Micro-shaft. "PowerHell" is their "Rosemary's baby", their bastard stepchild satan-spawn of a command line interface, slow to load and too over-complicated for its own good. I don't have enough adjectives available to describe its horror, other than to call it "PowerHell" in hopes that everyone will intuitively understand...

    I once wrote a shell for 3.x that worked pretty well. It extended the 'command.com' capabilities somewhat, offering some windows-specific things like spawning a windows program asynchronously, listing all of the running tasks, yotta yotta and some command/control features that let you send keystrokes to a window and control an application. It was shareware and never really went anywhere. When '95 released, I just stuck with CMD and that was the end of it. But 'PowerHell' - that's like "the dark side" of the force, and NOT in a good way.

  32. Rob Gr

    Re: ksh or nothing, thank heavens for cygwin

    I must admire the originality of your wit. Micro-Shaft, .Not, and Power-hell.

  33. fobobob

    Does it still take an obnoxiously long time to launch? Also, do you still need to set the execution permissions (or sign your own scripts) if you actually want to run anything?

  34. Dwarf Silver badge

    @fobobob

    Don't know, for a couple of years now, mine fires up as a $ or # and does everything I want.

    I can even kick off a scripting language if that's what I want to do.

    Trying to imagine a scripting language is a shell is a bit far fetched in my mind. Agree with the other comments about perl !

  35. Adam 52 Silver badge

    It still had unfathomable signing requirements last week when I gave up and installed sed, curl and cut instead (and called them from a batch script).

  36. RS232 4 Eva

    On my PC it loads instantly. I'm sure it slows down if you have a startup profile script and lots of extra modules loading, but then it's doing a lot more.

  37. Anonymous Coward
    Anonymous Coward

    Go to Windows 10 Settings>>Developer's options. There's a option about signing.

  38. Paul Crawford Silver badge

    I can see MS' point, but then I don't really care as I use cygwin or the better native Linux shells...

    Oh dear it is useful for a few, but their number get fewer.

    Some day no one will march their at all...

  39. Anonymous Coward
    Anonymous Coward

    Upvoted for the reference. No judgment on the content.

  40. ShelLuser
    Windows

    Weird move...

    I consider myself a PowerShell fan, I think it's one of Microsoft's best developments so far. Giving the techie's the ability to administer almost everything from a commandline? It's awesome. Well documented, and also provides plenty of options to extend on it. Adding a few functions to your profile? Just add some documentation lines (#.SYNOPSIS [next line:] # Short explanation of my function) and it'll look and feel as if it was a native feature.

    It's for a good reason why I have PowerShell pinned on my taskbar.

    But here's the problem: in comparison to cmd.exe PowerShell is extremely bulky. For good reasons: the entire .NET library gets loaded and placed at your fingertips. But that comes at a price: performance. Just start PowerShell, then try this: Get-ExecutionPolicy -List (remember that tab completion works). You're using a controlled environment which constantly checks if you're actually allowed to run certain scripts or programs. And that's but one example.

    PowerShell is a very good thing when you're running scripts which handle server administration, but it gets annoying if all you need to do is run a simple batch file which performs some common tasks. Or if you simply want to do some basic things yourself like copying a file, running sc.exe to check on a windows service or using vssadmin to clean up any used shadow copies.

    It is for weird changes like these why I don't use Windows 10. Because how long will it take before the choice which we have now is taken away from us?

  41. tfewster Silver badge
    Facepalm

    Re: Weird move...

    How is `cp file d:\directory` difficult? (especially with tab completion, [keeping tabbing until it shows the right directory e.g. 'C:\Program Files (x86)'] )

    As a Unix/Linux guy, who occasionally has to work with Windows clients, I find Power"Shell"* very useful; I can do finds, greps and diffs (frequently using their aliases mapped to Linux commands). Yes, I needed to check the man/help pages for some of the commands. But it took me hours to figure out how to use `find` in Unix from just the man pages (many years ago, with no-one, not even t'internet for help), so now I've compiled a cheat-sheet.

    Converting batch files to run under PowerShell? I'm pretty sure I could automate that - using PowerShell :-)

    * It's not just a shell that needs to load other programs to be useful like bash does; Many of the most frequently used utilities (see list above) are built in.

    I'm no fan of Microsoft, but kudos to the PowerShell team.

  42. Mage Silver badge
    Facepalm

    Re: Weird move...

    It's not that PowerShell is good or bad, we have had it for nearly 10 years and you can use it any time you want. It's the constant gratuitous changes to GUI and behaviour of the system, that's arrogant and wrong. The argument should NOT be about if Powershell is better or worse than cmd.exe, but the misleading change to user interface.

  43. RS232 4 Eva

    Re: Weird move...

    PS C:\Users\me> Measure-Command {Get-ExecutionPolicy -list}

    Days : 0

    Hours : 0

    Minutes : 0

    Seconds : 0

    Milliseconds : 3

    Ticks : 32171

    TotalDays : 3.72349537037037E-08

    TotalHours : 8.93638888888889E-07

    TotalMinutes : 5.36183333333333E-05

    TotalSeconds : 0.0032171

    TotalMilliseconds : 3.2171

    I think I can wait 3 milliseconds for it to complete. :-)

  44. IanRS

    Re: Weird move...

    I typed get-ex<TAB> and wondered whether I had crashed the shell. Several seconds later it completed the command.

  45. Prst. V.Jeltz Silver badge
    Trollface

    Re: I think I can wait 3 milliseconds for it to complete. :-)

    you must have a slow machine

    Days : 0

    Hours : 0

    Minutes : 0

    Seconds : 0

    Milliseconds : 0

    Ticks : 7488

    TotalDays : 8.66666666666667E-09

    TotalHours : 2.08E-07

    TotalMinutes : 1.248E-05

    TotalSeconds : 0.0007488

    TotalMilliseconds : 0.7488

  46. tin 2

    Illustrates my long held view that Microsoft creates the shittest version of everything. in 2016 they replaced their extraordinarily shitty shell with just a plain shitty one.

    Massively impressive.

  47. Shart Tank
    Thumb Down

    Yet another Windows 10 annoyance

    cmd.exe is not good, but at least it is fairly simple, and has "worked" for all versions of Windows.

    I don't want to learn yet another scripting language, particularly one with such limited portability.

    May Microsoft's executives spend a long span in purgatory trying to eat soup with chopsticks, until they grasp the notion that while users appreciate new functionality, they don't want it enforced by default.

  48. This post has been deleted by its author

  49. bombastic bob Silver badge
    FAIL

    Re: Yet another Windows 10 annoyance

    "cmd.exe is not good, but at least it is fairly simple, and has "worked" for all versions of Windows."

    it does what _I_ want. And I could type in 'cmd' and rapidly create a desktop icon for it, or run it from the start (what used to be) menu EASILY. So what do you type in for 'power-hell' now?

    It's just like MICROSHAFT to JAM A CHANGE FOR THE SAKE OF CHANGE into our orifices, just because they *FEEL*.

    The reason they're jamming POWER-HELL up our collective backsides is because it SUPPORTS ALL OF THAT '.NUT' CRAP. They've got ".NUT" on the brain, and it's made them ".NUTTY".

  50. Doctor Syntax Silver badge

    Re: Yet another Windows 10 annoyance

    'KDE 4? Gnome 3? It's not for nothing that Mint was born - there were simply enough people fed up with having "cool stuff" shoved down their throats that they neither wanted nor needed.'

    I'm not sure I recognize that situation. There were lighter weight desktops around all along. AFAICR Mint was a response to people wanting Gnome 2 functionality when a seriously deficient Gnome 3 arrived. KDE 4 also arrived on the scene with a good deal missing in comparison with KDE 3 (although it was supposed to be an early development version not intended for serious use). Those of us using KDE do so because it actually has stuff we want and the rest don't (in my case complete control of how I use the desktop surface).

    The advantage of Unix-like systems is that they don't shove anything down anyone's throat. They provide the choice you advocate from a plain vanilla console upwards.

Page:

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2018