PowerShell and CMD are both native to Windows OS, but the following shows their differences.
| Feature | PowerShell | Command Prompt |
|---|---|---|
| Introduced | 2006 | 1981 |
| Command types | Can run both batch | Can only run batch |
| commands and | commands | |
| PowerShell cmdlets | ||
| Command aliases | Supports the use of | Does not support command |
| command aliases | aliases | |
| Piping output | Cmdlet output can | Command output cannot be |
| be passed to other | passed to other commands | |
| cmdlets | as structured object, | |
| only as text | ||
| Output format | All output is in | Output of commands is |
| the form on an | text | |
| object | ||
| Command execution | Able to execute a | A command must finish |
| sequence of cmdlets | before the next command | |
| in a script | can run | |
| Integrated Scripting | Has an Integrated | Does not have an ISE |
| Environment | Scripting | |
| Environment (ISE) | ||
| Programming libraries | Can access | Cannot access these |
| programming | libraries | |
| libraries because | ||
| it is built on the | ||
| .NET framework | ||
| Platform | Can be run on Linux | Can only be run on |
| compatibility | Windows systems | |
| Parallel Execution | Can multi-thread | Must finish one command |
| commands to run in | before running another | |
| parallel | ||
| History & Logging | Has more powerful | Has no logging but some |
| history & logging | session history and is | |
| therefore more stealthy |