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

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube