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 ... |
Get Windows PowerShell Quick Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.