How can I supress the detailed information from Test-NetConnection -ComputerName localhost for a PowerShell session?
Test-NetConnection writes quite a bit of information to the console which is displayed in the top of the console, overwriting the progress bar.
The output can be suppressed by setting the
It looked like the output could be supressed like with the -InformationLevel to Quiet like so-InformationLevel parameter, however it turns out that even with -InformationLevel to Quiet the information in the top of the console is shown.
Test-NetConnection -ComputerName localhost -InformationLevel Quiet
I would like to set the InformationLevel just once for the whole script, like you would suppress the progress bar when using Invoke-WebRequest.
$progressPreference = 'silentlyContinue' # Subsequent calls do not display UI.
Invoke-WebRequest ...
$progressPreference = 'Continue' # Subsequent calls do display UI.
To my knowledge there is no similar $InformationLevelPreference Test-NetConnection will listen to.
