concept redirection operator in category powershell

appears as: redirection operator, The redirection operators, redirection operators, redirection operators
Windows PowerShell in Action, Third Edition

This is an excerpt from Manning's book Windows PowerShell in Action, Third Edition.

You can save the output of an expression to a file by using the redirection operator:

  • The PowerShell redirection operators allow you to control where the output and error objects are written. They also allow you to easily discard these objects if so desired by redirecting to $null. The redirection operators are “syntactic sugar” for the Out-File cmdlet. Using the cmdlet directly allows you to control things such as what file encoding will be used when writing to a file.
  • You can use the redirection operators to send particular types of output to a file. The type of data to be output is identified as follows:

    Figure 14.2. Revised pipeline including the use of redirection operators