Slashdot Mirror


Microsoft Replaces Command Prompt with PowerShell in Latest Windows 10 Build (softpedia.com)

Bogdan Popa, writing for Softpedia:The latest Windows 10 insider build brings a change that puts the Windows PowerShell in the spotlight, as it replaces the super-popular Command Prompt in some essential parts of the operating system. Command Prompt has been around for as long as we can remember, but starting with Windows 10 build 14971, Microsoft is trying to make PowerShell the main command shell in the operating system. As a result, PowerShell officially replaces the Command Prompt in the Win + X menu, so when you right-click the Start menu, you'll only be allowed to launch the more powerful app. Additionally, in File Explorer's File menu and in the context menu that appears when pressing Shift + right-click in any folder, the old Command Prompt will no longer be available. Typing cmd in the run dialog will launch PowerShell as well, so Microsoft has made a significant step towards phasing out the traditional Command Prompt.

37 of 280 comments (clear)

  1. Don't forget... by Pseudonymous+Powers · · Score: 4, Informative

    Every time you open a command prompt, don't forget you have to enter "set-executionpolicy unrestricted" before you can actually run anything.

    Usable!

    1. Re:Don't forget... by Anonymous Coward · · Score: 3, Informative

      or you set it globally, once, and you're done with it

    2. Re:Don't forget... by FreelanceWizard · · Score: 4, Informative

      Open Powershell as administrator and type:

      set-executionpolicy unrestricted -scope localmachine -force

      Alternatively, set it through Group Policy (Policies\Administrative Templates\Windows Components\Windows Powershell\Turn on Script Execution, set to "Allow all scripts").

      --
      The Freelance Wizard
    3. Re:Don't forget... by The-Ixian · · Score: 2

      You can always set aliases for any cmdlet. There are many aliases which come out of the box with PS. For example: wget is the default alias for Invoke-WebRequest

      I personally like the verbosity of the commands. Of course, I am always the guy who uses the logopts in Linux commands anyway (--verbose).

      Besides, if you are using the ISE or the PS console, you can tab complete the cmdlet names as well as the arguments so it is not a lot of extra typing.

      --
      My eyes reflect the stars and a smile lights up my face.
    4. Re:Don't forget... by bdh · · Score: 4, Insightful

      You think Betty Sue is not capable of running anything more than one command-line tool and will be befuddled by this change, yet you think Linux is the alternative?

      People who have trouble with "copy", "type", and "dir" rarely find "cp", "cat" and "ls" easier or more intuitive.

    5. Re:Don't forget... by Anonymous Coward · · Score: 2, Interesting

      which ain't gonna happen on tens of millions of corporate desktops...

      Millions of corporate desktops won't need it. How many accountants do you know that regularly use the windows command prompt? This is a power-user feature, and if there is a business justification for allowing it, it will be set as a Group Policy on the desktops of the people who need it.

      nope, that won't be allowed either

      Why not? Every IT organization I'm aware of evaluates requests based on their business need. Which means that if you have a legitimate business need to run unsigned powershell scripts, it will be enabled. If you want to run unsigned powershell scripts "because I'm a l33t hax0rz", then yeah, they'll deny you as well they should.

      You're also forgetting the third option: Create a personal signing certificate for yourself, add that certificate to your local Trusted Publishers store, and you're off and running just fine with anything you want to sign locally. Which is arguably a better solution than "allow any script whatsoever", and certainly gives the local "power user" the ability to do what they need to.

    6. Re:Don't forget... by __aaclcg7560 · · Score: 2

      >> Open Powershell as administrator

      which ain't gonna happen on tens of millions of corporate desktops...

      I work in government IT and admins have full access to PowerShell scripting.

      >> set it through Group Policy

      nope, that won't won't be allowed either.

      Admin accounts should be separate from ordinary user accounts. I access my admin account with a security token and my regular user account with my PIV card.

      I see only pain ahead, and it's going to be felt worst by Betty Sues' who run this one command-line tool once a day/week on their shitty seven-year-old Dell desktop to their job, and the managers who will ask IT why they are getting screwed again. Maybe this is how the "year of the Linux Desktop" finally gets going?

      Love it when users and managers play the victim game and blame IT. Even more funny when I replace their computer with a box of crayons.

    7. Re:Don't forget... by lgw · · Score: 3, Insightful

      You can always set aliases for any cmdlet.

      Which does wonders when sharing scripts with your team/friends.

      Heck, think of this in terms of what you're going to have to repeat 3 times over the phone to elderly relatives. (OK, I just tell them "get a Mac" and then "oh, I know nothing about Mac, try my brother", but my solution may not be general.)

      --
      Socialism: a lie told by totalitarians and believed by fools.
    8. Re:Don't forget... by Anonymous Coward · · Score: 3, Informative

      Betty Sue (BS), will call the help desk and they will tell her to open Settings, go to Personalization, TaskBar, and turn the Powershell replaces CMD option off. Problem solved. Or does nobody realize that the option is right there in settings? I turned it off right away. If I want to start powershell I will. Normally I just want CMD.

    9. Re:Don't forget... by tepples · · Score: 2

      If by "anything", you mean unsigned scripts, well, sort of.

      Then how do you sign a script without paying hundreds per year to the CA racket? Last I checked, code signing had no counterpart to Let's Encrypt or even an affordable Comodo reseller like SSLS.

    10. Re:Don't forget... by ColdWetDog · · Score: 2

      This is such an old complaint. These days you send your relatives (especially your relatives) to the very friendly Windows telephone support folks who called you the other day.

      Win, win. So to speak.

      --
      Faster! Faster! Faster would be better!
    11. Re:Don't forget... by chipschap · · Score: 2

      Now you know why I installed Cygwin & mintty.

      Now you know why, on every new computer I've had for years now, right out of the box I've wiped the hard drive and installed Linux.

    12. Re:Don't forget... by Man+On+Pink+Corner · · Score: 2

      It's called "Breaking things that work." It's not OK when Linux does it, and it's not OK when Microsoft does it.

  2. what about COMMAND.COM? by Anonymous Coward · · Score: 5, Funny

    If they get rid of COMMAND.COM, I'm going straight back to CP/M.

    1. Re:what about COMMAND.COM? by hAckz0r · · Score: 2
      8080 > PIP C:COPY.COM=C:PIP.COM

      Gates: There, fixed it to work better! (CP/M ==> QDOS Quick and Dirty OS, aka. PC-DOS).

      IBM: Well, except all the arguments are all backwards. How do we ever fix that? How will we ever sell this thing? Nobody will ever figure out how to use it now...

      Gates: Easy, I'll write a contract to force everyone to buy a copy along with the machine. Just like selling a car with an engine.

  3. Ubiquitous != Popular by Anonymous Coward · · Score: 2, Interesting

    Just because it's been around for a long time doesn't mean it's popular. Thank goodness for cygwin and bash.

  4. As long as cygwin works by Snotnose · · Score: 2

    they can do whatever they want to the command line.

  5. bash it! by guygo · · Score: 2

    I see bash for Windows becoming a lot more popular in the near future.

    1. Re:bash it! by YrWrstNtmr · · Score: 5, Funny

      No, bashing Windows has long been a staple theme in here.

  6. It's hard to get over 25 years of habit by slaker · · Score: 4, Insightful

    I know Powershell and it has been around for a while now, but it's almost always less mental effort on my part to string together shell commands than to open the Powershell ISE and read up on keywords and object attributes. It's habit, but I'd rather keep the thing I'm used to. I know bash scripting and perl too and I can be productive in perl but it's almost always faster for me just do what I need with bash, so I suppose the analogy is similar.

    --
    -- I wanna decide who lives and who dies - Crow T. Robot, MST3K
    1. Re:It's hard to get over 25 years of habit by Anonymous Coward · · Score: 3, Informative

      Then just type in 'cmd' and you are set. They aren't removing the application.

      ...SNIP...Typing cmd in the run dialog will launch PowerShell as well, so Microsoft has made a significant step towards phasing out the traditional Command Prompt.

      From TFS...

  7. Powershell is the devil's work! by Anonymous Coward · · Score: 5, Funny

    Microsoft registered WindowsPowersHell.org for a reason, people!

  8. This is a BAD idea support wise by Anonymous Coward · · Score: 4, Insightful

    I love Powershell, but half the "admins" I've worked with still don't know how to really use it. It's not an enhanced command or command+, it's a completely different product that unfortunately looks similar enough that non-technical people are going to have no frigging idea what's going on.

    This is going to cause a nightmare for call center staff who all have scripts that say something along the lines of "Open a command prompt and ...".

  9. I still don't want it by DrXym · · Score: 5, Insightful
    The normal command prompt is simple, stupid and does what it's told. Powershell is like some esoteric, incompatible, overly complex thing that claims to do anything via cmdlets, scripts, functions etc. but ends up just complicating everything including the simple stuff. It doesn't even have the good grace to be a superset of command prompt or bash which would at least make it familiar.

    I don't see how forcing people to use it is supposed to win people over or fail to piss off people who want the old command prompt.

    1. Re:I still don't want it by DrXym · · Score: 4, Informative
      You can't issue dos/cmd commands. The likes of "dir" are aliases onto things in powershell which superficially resemble the old commands but function differently.

      For example I can type "dir", but "dir /?" doesn't do a thing. So maybe the syntax is a bit different. Typing "dir -help" or "dir --help" issues an enormous error message that apparently I've done something wrong. Not helpful. Typing "help dir", tells me about something called "get-childitem" but essentially doesn't help at all except tell me to type "get-help Get-ChildItem -detailed". Eventually I get a wall of text which STILL doesn't correspond to the old syntax.

      Would it have really killed Microsoft to make "dir" function like "dir"? Maybe later on when I'm comfortable and familiar with the powershell I might want call get-childitem for something. But it is FAR more important to me during transition that the thing is familiar and all the various .bat / .cmd scripts that I have actually survive the transition.

      I should add that the command "ls" also aliases to "get-childitem". So Microsoft are equal-opportunity confounders.

    2. Re:I still don't want it by DrXym · · Score: 2
      My point if it wasn't clear was there was no reason for incompatibility in the first place. If "dir" can be aliased to something called "Get-ChildItem", then it could have been aliased to something called "Get-Dos-Dir" which implemented the same arguments and behaviour as the CMD dir. The same applies for the other commands built into CMD - popd, pushd, cd, goto, if etc. plus any syntax for environment variable expansion, pipes, redirection etc. Even invoking the command "cmd" itself could have been implemented such that it correctly parsed and executed .bat and .cmd files all from Powershell.

      If Microsoft had done this, then it wouldn't even be a point of discussion because cmd would be long gone. The problem was that Microsoft *didn't* do this. Cmd and Powershell ran in parallel, incompatible worlds and anyone concerned with all-too-real bullshit of different versions of .NET or Powershell on some random PC would have written their scripts for cmd as the lowest common denominator. And that's exactly what actually happened.

      Meanwhile in Unix-land, bash was largely a superset of ksh was largely a superset of sh so migrating was easy and natural. Everyone uses bash and there's a reason for that. Can you guess?

    3. Re: I still don't want it by tangent · · Score: 2

      I mostly agree with you, but to me, the major problem with PowerShell is that it's basically a REPL for a C#-like programming language. If I wanted to write C#, I'd launch Visual Studio.

      Take the GetChildItem and error message reportage you brought up. The fact that "dir" is implemented in terms of GetChildItem and it's easy to discover that accidentally is a *good thing*, the same sort of thing that so many of us geeks used to praise Smalltalk for. The real downside here is that PowerShell errors are basically stack traces, and successful returns are full-on .NET objects, which turns shell use into a kind of software development activity.

      All of that would be fine if what I was trying to do is write durable software. The thing about Unix-style interactive shell use, though, is that it's ephemeral. I'm not after a durable, clean, long-lived solution. I just need a command I can type in a second or so, and as soon as that command has successfully executed, I can forget it.

      I think PowerShell is great *technology* but a bad user experience.

      The Unix community said, "Look, the shell is a great programming environment, you can whip ad hoc things up quickly and easily," so Microsoft said, "Hey, we know how to build programming tools. We've got this great .NET thing sitting right here...let's make a shell out of that!" The problem is that C# was designed to be written down into *.cs files, saved into a version control system, and compiled to executables. It is not particularly well-suited to interactive, one-off, ad hoc shell commands.

  10. The usual Microsoft confusion-fuckup by Anonymous Coward · · Score: 2, Interesting

    On my current Windows 10, there's no less than 4 different PowerShell version that I can invoke, and presumedly they work different, and a script may or may not work depending on what PowerShell you invoke. Is this how it's supposed to work?

  11. That's one way to increase adoption :-) by ErichTheRed · · Score: 5, Interesting

    As a long-time Windows admin/systems guy, I think it's definitely time to do this. The batch language is very easy to use for procedural scripts, but in the world of things like desired state configuration, API-driven everything, etc. it makes sense to have a scripting language that basically makes the same calls a compiled program would.

    I think the two major drawbacks that are presenting a learning curve are the syntax and the "scripting Legos" aspect. Syntax is...interesting. I have tons of cross platform experience so I have good understanding of lots of command languages. PowerShell's syntax is like DCL (the OpenVMS script language,) Bash and Perl got together and had a 3-parent baby. It's extremely verbose a la DCL, yet extremely symbolic like Perl, and has Bash-like constructs in there as well. Once you get used to it it makes sense, but there's definitely some learning before you're proficient enough to write full redistributable tools in it. The other thing that puts a lot of people off, but that's actually great about it, is that commands don't output text and you have to think things like object types. Bash, batch files or VBScripts have to include tons of logic to parse output, read/write INI files or XML data, etc. That gets reduced to a single statement -- want a CSV of the output? Export-Csv replaces tens of lines of function code to open a file, construct the strings and write them out. It's awesome but very different from the craft-your-own days....just like writing modern software, it's just gluing someone else's code Legos to each other and interfacing with APIs. It's hard to tell what you should be writing and what is already written for you and you're just assembling if you're used to building it all yourself and manipulating stuff with sed/awk/grep and friends.

    That said, it's definitely time for Windows admins to get on board with PowerShell. Admins that survive the next transition are going to be managing thousands of servers or microservice instances at some IT provider. You can't manage systems at that scale by manually connecting to them and tweaking things. It's the same thing with Microsoft's Azure service -- it's been developer focused from Day 1, and admins are just now getting documentation that's even somewhat tailored to their experience. I know DevOps is the cool new buzzword, and every admin should have some basic coding skills under their belts, but it's hard to take someone who's been taking care of systems and telling them to treat them like software deployments. This is going to be the next big leap for systems guys now that software defined everything is pretty mainstream.

  12. Re:If they really wanted to fix it... by The-Ixian · · Score: 2

    Actually, "Lunix" means "Linux Torvaldes's Unix."

    Did he officially change his name or something?

    --
    My eyes reflect the stars and a smile lights up my face.
  13. So much for compatibility by Dwedit · · Score: 2

    So much for compatibility.
    In powershell, you can't type in "cd\directory".
    Not to mention that any shortcut to "CMD /C" or "CMD /K" will break overnight.

  14. Re:If they really wanted to fix it... by beernutz · · Score: 3, Insightful

    Hmmmm.. Pretty sure it is a recursive acronym: Linux = "Linux Is Not UniX" Kind of like GNU = "GNU is Not Unix".

    --
    (stolen from DaBum) I am dyslexia of borg - your ass will be laminated.
  15. Microsoft needs better managers. by Futurepower(R) · · Score: 2, Interesting

    "... I hate the syntax of PowerShell."

    Agreed. PowerShell is the Zune of syntaxes.

    Microsoft needs better managers. Former Microsoft CEO Monkey Boy, was the least respected CEO of a big company. Ballmer was rated the worst CEO in the United States: Quote from an article in Forbes Magazine about Steve Ballmer: "Without a doubt, Mr. Ballmer is the worst CEO of a large publicly traded American company today." Another quote: "The reach of his bad leadership has extended far beyond Microsoft when it comes to destroying shareholder value -- and jobs." (May 12, 2012)

    This story doesn't even mention the Zune: Microsoft's 10 biggest failures.

  16. This is what I hate about Microsoft by JustNiz · · Score: 5, Insightful

    "you'll only be allowed to launch the more powerful app"

    Hey Microsoft, please remind me: who owns my PC?

  17. It's Hammer time... by HBI · · Score: 2

    because Hammer don't use nails.

    --
    HBI's Law: Frequency of calling others Nazis is directly correlated with the likelihood of the accuser being Communist.
  18. Re:Be a man and make an alias by ColdWetDog · · Score: 4, Funny

    You could try making an alias that gets detailed help. Call it man.

    Are you kidding? Call it MAN? Do that and you're gonna have a herd of SJWs down your neck in a flash.

    Besides, MAN does not ask for help. Where do you get these ideas anyway?

    --
    Faster! Faster! Faster would be better!
  19. Re:If they really wanted to fix it... by strikethree · · Score: 2

    If you mean backronym, then maybe. I read what you said and knew it was wrong immediately but I went ahead and looked it up:

    https://en.wikipedia.org/wiki/...

    The relevant section is this:

    Linus Torvalds had wanted to call his invention Freax, a portmanteau of "free", "freak", and "x" (as an allusion to Unix).

    ...

    Ari Lemmke, Torvalds' coworker at the Helsinki University of Technology (HUT) who was one of the volunteer administrators for the FTP server at the time, did not think that "Freax" was a good name. So, he named the project "Linux" on the server without consulting Torvalds.[12] Later, however, Torvalds consented to "Linux".

    --
    "Someone needs to talk to the tree of liberty about its ghoulish drinking problem." by ohnocitizen