> For the complete documentation index, see [llms.txt](https://x7331.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://x7331.gitbook.io/notes/windows-shells/powershell/powershell-vs.-cmd.md).

# PowerShell vs. CMD

<table><thead><tr><th width="205" align="right">Feature</th><th>CMD</th><th>PowerShell</th></tr></thead><tbody><tr><td align="right"><strong>Language</strong></td><td>Batch and basic CMD commands only.</td><td>PowerShell can interpret Batch, CMD, PS cmdlets, and aliases.</td></tr><tr><td align="right"><strong>Command utilization</strong></td><td>The output from one command cannot be passed into another directly.</td><td>The output from one command can be passed into another directly.</td></tr><tr><td align="right"><strong>Command Output</strong></td><td>Text only</td><td>PowerShell outputs in object formatting.</td></tr><tr><td align="right"><strong>Parallel Execution</strong></td><td>CMD must finish one command before running another.</td><td>PowerShell can multi-thread commands to run in parallel.</td></tr></tbody></table>

## PS Access

PowerShell is an [open-source project](https://github.com/PowerShell/PowerShell) and uses the `.NET` framework which has made it capable of utilising an object-based model of interaction and output. It has powerful logging capabilities, so if we need to be more stealthy, we should utilize CMD.

PowerShell can be accessed through CMD, as well as via the **Windows Terminal** which will soon become the default terminal emulator for Windows, as everything can be accessed through there. **PowerShell Integrated Scripting Environment (ISE)** is like a PowerShell IDE for creating scripts.

<figure><img src="/files/autyMs1ccPtd1e3lR71A" alt=""><figcaption><p>The Windows terminal emulator.</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://x7331.gitbook.io/notes/windows-shells/powershell/powershell-vs.-cmd.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
