What is the practical difference between Windows Command Prompt and PowerShell?
Answer
Command Prompt mainly runs traditional console programs and batch commands and passes text between commands. PowerShell is an automation shell and scripting language built around cmdlets and structured .NET objects, so filtering, selecting properties, error handling and automation are usually more reliable than parsing formatted text.
Strong answer includes
- CMD is primarily text-oriented and batch-compatible
- PowerShell pipelines pass structured objects between cmdlets
- chooses the shell based on task and available tooling
Practical example
To find a Windows process, `tasklist | findstr java` parses text, while `Get-Process java | Select-Object Name,Id,CPU` works with process objects and explicit properties.