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.
Just because it's been around for a long time doesn't mean it's popular. Thank goodness for cygwin and bash.
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?
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.
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.
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.
"... 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.