PowerShell has a problem with it's extra output streams. The actual content of the Warning, Verbose, Debug, Information, and even Error streams doesn't have the label text like "WARNING: " or "VERBOSE: " that we're used to seeing in the host. That label is actually added by the host (hopefully, in a culture-aware way). However, this means that when you attempt to redirect all of this output, for example by redirecting all output streams to stdout, with *>&1
, you don't get labels on them at all, which is confusing, and can make the output difficult to comprehend.
Take for example a function that writes in a loop:
if ($i % 5 -eq 0) {
Write-Output $i
} else {
Write-Verbose $i
}