Alternatively you could direct the outputs to a log file instead.
Don't know the magic that powershell uses but to extend the previous Windows examples, 1> is for stdout (regular console output) and 2> is for stderr (sometimes reserved separately for when errors occur). With > meaning create/write the output file if it doesn't exist, and >> being create/append the output.
So you could do things like:
dir c:\ 1>> stdout.txt 2>> stderr.txt
dir p:\ 1>> stdout.txt 2>> stderr.txt
Each time you run it, the output will go to the respective file. In my case, since I don't have a p: drive the error output goes into stderr.txt to say the error message that dir generates, whereas correct listing outputs go to stdout.txt