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.

13 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 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
    2. 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.

  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.

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

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

  4. 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
  5. Powershell is the devil's work! by Anonymous Coward · · Score: 5, Funny

    Microsoft registered WindowsPowersHell.org for a reason, people!

  6. 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 ...".

  7. 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.

  8. 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.

  9. 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?

  10. 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!