Behind the CLI: PowerShell vs. Command Prompt

Think back to your first computer or command line interface (CLI)…

If you can remember floppy disks and a green text screen with a cursor blinking a familiar C:\> prompt, you’ve gone too far. Maybe think back to your second computer, or even your third. Remember the streamlined GUI and boot from hard disk option that replaced the C:\> prompt on Microsoft machines? That is known as Command Prompt, or CMD for short; and until Windows 7, CMD was the only game in town.

Windows Command Prompt lived peacefully for decades until it got an upgrade and became Windows PowerShell. First introduced with Windows 7, it eventually became the default shell with Windows 10. The standard CMD had a good run, but PowerShell gave users more control and promised a better user experience while cutting the time it took to complete common system administration (sysadmin) tasks.

Windows Command Prompt

Command Prompt was the original shell for MS-DOS (Microsoft Disk Operating System) and it remained the default shell until Windows 10 - that’s when Microsoft set PowerShell as the default option. CMD had a simple job —to execute entered commands. Users could perform administrative functions, troubleshoot, and even solve certain kinds of Windows issues - all from the CMD.

Command Prompt
Command Prompt

Windows PowerShell

As computing tasks became more complex, using CMD became more time-consuming. Instead of simple single-step commands, users had to manually repeat a series of commands - across several machines - in order to perform certain sysadmin tasks.

In response to the changing needs of users, PowerShell was born. It is the newest Microsoft shell combining all of the old CMD functionality with new features like scripting and the ability to create cmdlet instruction sets. It even includes built-in sysadmin capabilities to tackle common tasks. PowerShell allows users to automate tasks using reusable scripts to save time and free up sysadmins for other tasks.

PowerShell vs. CMD

PowerShell and CMD perform very similar functions, but they do so in completely different ways. The difference is particularly evident when executing complex tasks. For example, PowerShell uses cmdlets, which are self-contained programming objects that execute more complex tasks inside Windows.

Before PowerShell, sysadmins had to waste time navigating the GUI to find certain options. There was no way to automate the complicated pathway through multiple menus to quickly implement changes on a larger scale.

With PowerShell, sysadmins can create complex scripts that pass specific types of information (e.g., parameters or data from one cmdlet to another, automating pathway navigation, and allowing administrators to make mass changes automatically). They can even create an alias for a specific cmdlet or script - making it easy to find and switch between them.

graf1 2020 03 02

Switching from PowerShell to CMD

PowerShell became the default shell with Windows 10 and is gradually beginning to dominate its predecessor. However, if you’re not ready to make the switch, you can still revert back to CMD by doing the following:

  1. Right-click on the Windows 10 taskbar and select Taskbar Settings.
  2. When the Taskbar Settings menu appears, you will see a toggle switch next to “Replace Command Prompt with Windows PowerShell…” Click the toggle switch to turn it off.
  3. When you exit the Settings window, PowerShell will be replaced with CMD when you right-click your start menu or press Windows key + X.

You can revert CMD back to PowerShell by returning to the Properties menu and re-clicking the toggle switch.

Trusted Tech Team is an accredited Microsoft CSP Direct Bill Partner, carrying multiple Solutions Partner designations and the now-legacy Microsoft Gold Partner competency. Based in Irvine, California, we report trends affecting IT pros everywhere.

If your organization uses Microsoft 365 or Azure, you may be eligible to receive a complimentary savings report from a Trusted Tech Team Licensing Engineer. Click here to schedule a consultation with our team now to learn how much you can save today.

Subscribe to the Trusted Tech Team Blog

Get the latest posts delivered right to your inbox

Trusted Tech Team

Trusted Tech Team

Your source for all things tech

Read More