Command Shell (often called Command Prompt, or cmd.exe) and PowerShell are two different command-line tools built into Windows, and the short answer is that they are not interchangeable: Command Shell is the older, plain-text tool that runs basic DOS-style commands, while PowerShell is the newer tool that runs commands (called cmdlets) that pass real objects between each other and can control nearly every part of Windows. For simple file operations or running a legacy batch file, either works. For anything involving system settings, automation, or scripting, PowerShell is the right choice. This guide shows you how to tell them apart, how to open both, where their commands differ, and how to choose correctly so you do not waste an afternoon on a command that silently does nothing.

What You'll Need

  • A Windows PC (Windows 10 or Windows 11 unless stated otherwise; labels can differ slightly by version and region).
  • An account that can open a normal user window. Some commands need an administrator window; that is called out where relevant.
  • No installs required. Both tools ship with Windows.

Step-by-Step

  1. Open Command Shell. Press the Windows key, type cmd and press Enter, or type Command Prompt in the Start menu search. The window title shows something like Command Prompt, and the prompt ends in a single > after your folder path. This is the classic shell.
  2. Open PowerShell. Right-click the Start button and choose Terminal or Windows PowerShell from the menu that appears, or search for PowerShell in the Start menu. In the modern Windows Terminal app, a small dropdown arrow in the title bar lets you pick Command Prompt or Windows PowerShell as the profile. The PowerShell prompt starts with PS followed by your folder path, for example PS C:\Users\You>. That PS prefix is the fastest way to confirm which tool you are in.
  3. Confirm which shell you are using at any time. In PowerShell, run $PSVersionTable to see the version details. In Command Shell, run ver, which prints the Windows version rather than a shell version. If you type a PowerShell cmdlet into Command Shell, you get an error such as 'Get-ChildItem' is not recognized as an internal or external command; that error alone tells you which tool you are in.
  4. Compare a basic command. In Command Shell, dir lists the current folder. In PowerShell, dir also works because it is an alias, but the native form is Get-ChildItem. Try both: in PowerShell, Get-ChildItem | Where-Object {$_.Length -gt 1000000} filters files over roughly one megabyte, because each item is an object with properties. Command Shell has no equivalent; you would need a much clumsier for loop and text parsing.
  5. Pick the right tool for the task. Use Command Shell for running old .bat or .cmd scripts, quick ping, ipconfig, tracert checks, and legacy tools that expect plain text output. Use PowerShell for anything you want to script, filter, loop over, or connect to system management features, such as checking services, reading event logs, or managing files by size and date.
  6. Run administrative commands safely. For tasks that change system settings, open an elevated window: right-click Start, then choose the Terminal or PowerShell entry marked (Admin), or right-click Command Prompt in the Start menu and choose Run as administrator. Windows asks for confirmation. Read the command before pressing Enter; elevated windows can change files and settings with no undo.
  7. Test a script before trusting it. In PowerShell, paste commands one at a time and read the output. For risky operations such as moving or deleting many files, add -WhatIf to commands that support it to preview the result without changing anything. Command Shell has no built-in preview; run a version of the command that only lists what would be affected first.
  8. Close the gap when a tutorial assumes the other shell. If instructions say open a command prompt but use PowerShell syntax, open PowerShell instead. If they use batch syntax such as %USERPROFILE% for environment variables, use Command Shell, because PowerShell uses $env:USERPROFILE. Same idea, different syntax, and mixing them is the main source of confusion.

Common Mistakes

The most frequent mistake is pasting PowerShell syntax into Command Shell or the reverse and assuming the tool is broken. An error naming a cmdlet as not recognized, or syntax errors on dollar signs and braces, means the wrong shell. A second common error is running legacy batch scripts in PowerShell without expecting them to behave differently; some batch commands work only through the older shell. Another is running a command that needs elevation in a normal window and ignoring the access-denied message, then wondering why nothing changed. Treat an access-denied error as a prompt to open an administrator window, not as a reason to try the same command repeatedly.

Tips

Use Get-Help followed by a cmdlet name in PowerShell to read built-in documentation, and Get-Command to confirm a command exists and see its type. Tab completion works in both shells; in PowerShell it cycles through parameters too. Keep Windows Terminal as your default so both shells live in one window with tabs and profiles, which makes side-by-side comparisons easy. When following online instructions, look at the prompt style in any screenshot; the PS prefix tells you what the author used. Remember that folder paths with spaces need quotes in both shells. Finally, do not memorize every command; learn how to find the right one in each tool, since that skill transfers better.

Troubleshooting

If a command is not recognized, first confirm which shell you are in, then check the spelling and whether the command is a PowerShell cmdlet being typed into Command Shell. If a command runs but changes nothing, check whether it needs an administrator window; run whoami /groups to see your elevation state, though the output is dense. If PowerShell scripts refuse to run with an execution policy message, check the current setting with Get-ExecutionPolicy and change it only if you understand the security implications; prefer a scope-limited change over loosening it system-wide. If a window behaves oddly, close it and reopen, then update Windows through Settings > Windows Update, since the terminal and shell components are updated there. If output looks garbled, the codepage or character encoding differs between shells; PowerShell handles Unicode better, so prefer it for text work.

Frequently Asked Questions

Is PowerShell replacing Command Prompt?

No. Both ship with Windows 10 and Windows 11, and Microsoft keeps Command Prompt for compatibility with older tools and scripts. PowerShell is the recommended tool for new scripting work.

Can I run Command Prompt commands in PowerShell?

Many common ones work because PowerShell defines aliases such as dir and cd. More complex batch syntax, environment variable syntax in particular, does not translate, so use Command Shell for those scripts.

Which one is better for beginners?

PowerShell has a steeper start but much more helpful built-in documentation and object output. Command Shell is simpler for one-off legacy commands. Start with Command Shell for quick network checks and move to PowerShell for scripting.

Do I need administrator rights for both?

Only for commands that change system-wide settings, files outside your profile, or services. Normal listing and reading commands run fine in a standard window. Both shells offer an elevated mode.

Can I use PowerShell on macOS or Linux?

Yes, a separate cross-platform PowerShell edition exists and is downloaded from Microsoft's official site, but many Windows-specific cmdlets do not work there. Command Shell is Windows-only.

How do I know which one a tutorial is using?

Look at the prompt in any screenshot: a leading PS means PowerShell. Also check the syntax: Get-... verbs and $env: variables are PowerShell, while %VAR% and / switches are Command Shell.