Problem
The PowerShell style guidelines don't include guidance on the best practice for suppressing unwanted output from commands and methods. This leads to inconsistent usage of | Out-Null vs $null = across codebases.
Proposed Solution
Add a "Suppressing Output" section to the pwsh.instructions.md file that documents:
- Using
$null = for suppressing command output (preferred for performance)
- Using
[void] as an alternative for method calls
- Avoiding
| Out-Null due to significant performance overhead
- Examples of correct and incorrect usage
Expected Outcome
Developers will have clear guidance on how to properly suppress output in PowerShell scripts, leading to better performance and consistent code style across projects.