There are many ways to suppress output in pwsh:
1..100 | Out-Null
1..100 > $null
$null = 1..100
[void]1..100
All valid, Out-Null being the slowest due to pipeline and cmdlet overhead. Use what you find most readable!
Happy scripting!
There are many ways to suppress output in pwsh:
1..100 | Out-Null
1..100 > $null
$null = 1..100
[void]1..100
All valid, Out-Null being the slowest due to pipeline and cmdlet overhead. Use what you find most readable!
Happy scripting!