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 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.
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.
Dig Deeper on Microsoft Hyper-V management
Jason Helmick asks:
Which command-line shell do you use most frequently?
2 ResponsesJoin the Discussion