News

Windows Devs Prefer PowerShell as CLI

The Windows Dev Docs team on Twitter recently posted an informal poll asking, "Well? What's your go-to command line?" with choices being the cmd Windows command prompt, PowerShell, WSL Bash and Azure Cloud Shell.

With 314 votes, the results are in: it's PowerShell, with 45.2 percent of the votes, followed by cmd (37.6 percent), WSL Bash (15.6 percent) and Azure Cloud Shell (1.6 percent).

Twitter Survey
[Click on image for larger view.] Twitter Survey (source: Twitter).

Here are some developer comments about the issue:

  • Opening WindowsTerminal in Administrator mode with Powershell, CMD, Bash and CloudShell 😎✅🚀🤘
  • cmd as powershell is getting slower and slower and bash WSL
  • honestly cmd; Like I'd like to say PowerShell but I've been using cmd for support stuff since like the 90s
  • It's always cmd. Even changed the defaults.
  • It really depends on what I'm planning to do. That's why Windows Terminal has a right-click menu when you pin it.

So one might wonder what's up with Azure Cloud Shell (different from Azure CLI), which apparently was the favorite choice of only five developers. It's not like it's old, having debuted way back in 2017. Interestingly, Microsoft documentation says it just lets developers use one of two other survey options: "Azure Cloud Shell is an interactive, authenticated, browser-accessible shell for managing Azure resources. It provides the flexibility of choosing the shell experience that best suits the way you work, either Bash or PowerShell."

Direct Link Access Choice
[Click on image for larger view.] Direct Link Access Choice (source: Microsoft).

In fact, in accessing Azure Cloud Shell via direct link, a user must immediately choose one or the other, as depicted above.

Which to choose? The MSP360 site explains the differences in an article titled, "Azure CLI vs PowerShell: What Is the Difference?"

"PowerShell is a command shell and associated scripting language for the majority of Windows operating systems," the article says. "Bash is a Unix shell and scripting language for most Linux operating systems. The first version of PowerShell was introduced in 2006. The Bash shell appeared in 1989. PowerShell treats input and output as objects, while Bash always accepts input and output as text structures. The user interface of PowerShell is a command-line interface; that of Bash is a text command-line interface. PowerShell can be used on any version of Windows from Windows 97 onward. Bash is mainly used with Linux and Unix operating systems. PowerShell is a scripting language based on the .NET framework and C# programming language, while Bash is a scripting language based on the C programming language."

Main Differences Between Bash and PowerShell
[Click on image for larger view.] Main Differences Between Bash and PowerShell (source: LinuxConfig.org).

For more information, the LinuxConfig site earlier this year published an article titled, "Bash scripting vs PowerShell" in which is the handy comparison table above.

"What it boils down to is that Bash is great for administration and automation on Linux, and PowerShell fills that same gap but on Windows systems," the article concludes. "They both have some crossover, yet are at their peak on their native systems."

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube