Capturing Output
There are several ways to capture the output of commands in PowerShell:
Capturing output in PowerShell | |
|---|---|
Command | Result |
| Stores the objects produced by the
PowerShell command into |
| Stores the visual representation of
the PowerShell command into |
| Stores the (string) output of the
native command into |
| For most commands, stores the objects
produced by the PowerShell command into |
| Redirects the visual representation of
the PowerShell (or standard output of a native command) into
|
| Redirects the visual representation of
the PowerShell (or standard output of a native command) into
|
| Redirects the errors from the
Powershell or native command into |
| Redirects the errors from the
Powershell or native command into |
| Redirects both the error and standard output streams ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access