Stream redirection

While it isn't used very often with PowerShell, stream redirection is used now and then for different purposes. External applications, especially, tend to confuse the error and the output stream. This obstacle can be overcome quite easily with stream redirection.

In the last recipe, you learned about stream numbers. All numbered streams can be redirected with the redirection operators, > and >>. This recipe will show you how and when to use the redirection operators instead of the common parameters like ErrorAction or Verbose.