I’m trying to figure out what exactly Invoke-WebRequest cmdlet doing differently then other cmdlets as far as error output is concerned. If you execute it with non-existing URL then you end up with errors being put out into output stream. I assume if I use -ErrorAccount parameter to Silent then it will not show up in stream but it does not work. The same happens if I redirect output to Out-Null. Errors are still end up in a stream. What exactly is happening behind the scenes here?
Invoke-WebRequest http://www.cnn.com/nonexist.htm -ErrorAction Silent | out-null