Ask the Expert

What's the best command-line shell: PowerShell vs. CMD vs. Bash

Question: How does the latest version of PowerShell compare to other popular command-line shells, like Bash? What about PowerShell vs. CMD?

Jason Helmick: Comparing PowerShell vs. CMD or Bash is like comparing a 2013 Ferrari Spider to a 1969 VW Beetle. Sure they both have tires and a steering wheel, but the Ferrari has better ones. The Ferrari also comes with some amazing capabilities.

All kidding aside, the folks who developed

    Requires Free Membership to View

PowerShell had a strong love and appreciation for the ability of LINUX/UNIX (*NIX) shells to take advantage of the object-based capabilities of Windows. By leaning heavily on the success of long-lived *NIX shells and absorbing the best features from them, PowerShell provides a management platform that will make IT pros with *NIX experience feel right at home.

More Ask the Expert answers

What does the new VMware cloud certification mean?

Why store VMs on an SMB file share?

How to provide fault tolerance without a failover cluster

The Microsoft PowerShell team's belief in the importance of interactive management is signified by an object-based pipeline and thousands of commands (cmdlets). PowerShell offers an IT pro the immediate problem resolution on any scale that has been severely lacking in Windows graphical user interface (GUI) management tools. While the learning curve is steep for a Windows-GUI-only admin, it's well worth the climb when you can manage, deploy, inventory and repair as many systems as needed, from anywhere in the world, over PowerShell remoting.

Automation of those commands is as simple as copying them to a PowerShell script file -- similar to the old batch files. Any administrator can start automating reoccurring tasks without learning to program, but the scripting language capabilities of PowerShell really start to shine in the hands of a hardcore business scripter. While PowerShell's scripting language is C-based (really C#-based), the experienced *NIX pro will see an influence from other languages like PHP. PowerShell scripts can perform complicated tasks and true Runbook Automation with workflow.

Microsoft has invested heavily in making PowerShell a first-class citizen for management and continues to add PowerShell commands to its enterprise product lines.

The Ferrari and Beetle comparison truly shines when we talk about Powershell vs. CMD. PowerShell outweighs all efforts in the CMD with many important features -- many of which *NIX pros have had for decades -- such as:

  • Consistent command-naming structure (verb-noun);
  • Consistent syntax. No more guessing if it's a dash, slash or question mark;
  • Full object-based pipeline;
  • Simple scripting (automation) for all admins;
  • Advanced scripting capabilities, such as Runbook Automation;
  • The ability to quickly develop scripts into cmdlets for other admins; and
  • PowerShell remoting, which allows an admin to execute scripts anywhere, anytime, on any number of computers.

If you're a *NIX pro charged with managing Microsoft products and operating systems, PowerShell will feel like a comfortable pair of shoes with new soles.

If you're a Windows admin that has been locked into the GUI for most of your career, then PowerShell is a big hill to climb, but one you can climb successfully. It's worth the effort for your future career advancement and a return-on-investment benefit to your company.

Do you have a question for our experts? Submit your own! Email the editors at SearchServerVirtualization.com: nmartin@techtarget.com or janderson@techtarget.com

This was first published in February 2013

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Expert Discussion

Which command-line shell do you use most frequently?

Jason Helmick, Contributor
What's your opinion?
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.