PowerShell outputs information via different streams. Warnings are written to a different stream than output, and errors again go to a different stream. Each stream has a unique numeric identifier:
If you want to silence a stream, you can use the redirection operator (“>”) and redirect the stream(s) to $null. This line would discard any error or warning messages:
Get-Process -FileVersionInfo 2>$null 3>$null
ReTweet this Tip!
Powered by IDERA