I am using -WhatIf to aid in a pester test. I have tested the portion of code that executes the state change that the tool is accomplishing, but when testing different parameters that sets up the execution of that code, I don't need to rerun it. So I use -WhatIf to skip it. The problem is that I want to hide the WhatIf message because it makes the pester output a little muddy. Piping a "WhatIf Producing" command to Out-Null doesn't work, which makes me think that it doesn't write to Stream 1. After some further testing, I find that it doesn't go away with anything that I do such as redirecting it to a file, nullifying it, or redirecting all streams to std out then nullifying it.
(Stop-Process -Name Notepad *>&1) | Out-Null
I am referencing about_redirection for stream data to assist in troubleshooting. The only thing I can come up with is that to writes directly to host.