3
3
I'd like to suppress any output then function_b is invoked:
Function function_a {
"test" | Out-Default
}
function function_b {
[CmdletBInding()]
param()
function_a
}
# These are the things I've tried so far to no avail:
[void](function_b)
$null = function_b
function_b | out-null
function_b *>&1 | Out-null
Windows 10 has introduced a change to the Windows Update logging. Everything's now logged to ETL channels instead of "$env:SystemDrive\Windows\WindowsUpdate.log". In order to get the logs in a human readable format you have to generate the WindowsUpdateLog with the Get-WindowsUpdateLog Command which spews out a lot of useless stuff to the console which I'd like to suppress. As it turns out the command is part of a module and the helper functions in Get-WindowsUpdateLog all use Out-Default. My example illustrates the way that module is built.
1
&{Set-Alias Out-Default Out-Null; Get-WindowsUpdateLog ...}– user364455 – 2016-03-29T08:38:31.230