CMD
In short: The classic command line of Windows (cmd.exe).
In more detail: Considerably older and functionally more limited than the more modern PowerShell, which works with objects instead of pure text. CMD is still shipped for compatibility reasons, but for new scripts and automation on Windows, PowerShell is now usually preferred.
In Depth
Origin in MS-DOS
CMD ultimately descends from COMMAND.COM from the MS-DOS era and processes only plain text — every command outputs strings, which the next command in a chain has to interpret again as text. A simple CMD script (a .bat file):
@echo off
echo Backing up project files...
xcopy /E /I project backup
if %errorlevel% neq 0 (
echo Error while copying!
exit /b 1
)Limits of the text pipeline
PowerShell resolves this text limitation by passing structured .NET objects between commands instead of plain text — a command can directly access individual properties of an object (Get-Process | Where-Object CPU -gt 50), instead of laboriously parsing text via regex/findstr, as would be necessary in CMD. This limitation, together with limited control structures (no real functions, only simple if/for constructs with idiosyncratic syntax), a lack of object-oriented error handling, and an overall more cryptic scripting language, is the main reason CMD today is mainly still used for simple, short automation, or for legacy reasons (old batch scripts that have run unchanged for decades), while more complex Windows automation is almost always written in PowerShell.
Why CMD survives anyway
Despite its limitations, CMD remains relevant, because it’s extremely stable and available on every Windows installation with no extra configuration — for quick one-liners (kill a process, copy a file), the simple syntax is often enough, and many legacy corporate scripts from the 1990s/2000s still run unchanged in CMD today. Microsoft itself clearly recommends PowerShell for new projects, but keeps CMD alive permanently for compatibility reasons — a similar pattern to many other “legacy but impossible to kill” technologies.
Windows Terminal as a modern shell
For a few years now, Microsoft has offered “Windows Terminal”, a modern terminal application that combines CMD, PowerShell and (with WSL installed) Linux shells in tabs within the same, considerably more attractive interface — the underlying cmd.exe itself remains technically unchanged, only the shell around it has been modernised.
See also: PowerShell, Shell, Windows