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

Meet the new 10-year-old command line, better than the even older command line

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

"In an effort to bring the best command line experiences to the forefront for all power users, PowerShell is now the de facto command shell from File Explorer," said Dona Sarkar, software engineer in Microsoft's Windows and devices group, in a blog post.

"It replaces Command Prompt (aka 'cmd.exe') in the WIN + X menu, in File Explorer's File menu, and in the context menu that appears when you shift-right-click the whitespace in File Explorer."

Committed traditionalists can disable the aforementioned changes through the Taskbar menu. Typing "cmd" or "powershell" in File Explorer's address bar will still launch your desired command shell at that location. .BAT and .CMD files are still processed by cmd.exe.

Asked whether there's a reason to make this change now, a Microsoft spokesperson in an email to The Register suggested PowerShell as a default isn't a certainty and encouraged feedback about the switch.

"The new feature is only available through the Windows Insider Program at this time," the spokesperson said. "We are constantly experimenting with existing and new features in the Windows 10 Insider Preview in an effort to improve the user experience with Windows 10."

But Microsoft is clearly focused on PowerShell as a command-line and automation framework, because it reaches beyond Windows. In August, the company made PowerShell available on Linux. And it intends for PowerShell to serve as a tool for interacting with Azure workloads and its Operations Management Suite.

"Microsoft wants to earn customers' preference as the platform for running all their workloads – Linux as well as Windows," said Jeffrey Snover, technical fellow in Microsoft's enterprise cloud group, in a blog post at the time. "This new thinking empowered the .NET team to port .NET Core to Linux, and that in turn enabled PowerShell to port to Linux as well."

Asked whether PowerShell should be seen as part of Microsoft's outreach to Linux customers, Microsoft's spokesperson declined to address the question. "The new feature is only available through the Windows Insider Program at this time," the spokesperson said. "We have nothing further to share at this time."

Microsoft customers who rely on cmd scripts may be annoyed at the steady march of progress. Learning different commands can be a bother.

But PowerShell offers so much more than the Command Prompt that few mourners should be expected. 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.

That's not to say there aren't drawbacks like load time, hunger for memory, and potential security vulnerabilities [PDF] that come with the territory.

Just remember, with PowerShell comes great responsibility. ®

Updated to add on January 5, 2017

Microsoft says it's still committed to cmd.exe.




Biting the hand that feeds IT © 1998–2019