intrntpirate.bsky.social
intrntpirate.bsky.social
@intrntpirate.bsky.social
Reposted by intrntpirate.bsky.social
#pwsh tip of the day!

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!
December 13, 2024 at 1:33 PM