Powershell Best Practice #12: Avoid Out-Null

By | June 28, 2015

Best Practice: It is recommended to avoid Out-Null, use $null or [void] instead.

Explanation: When you want to supress the output of a command (example: when adding items to a collection), using Out-Null is slower than [void] or $null.


One thought on “Powershell Best Practice #12: Avoid Out-Null

  1. Pingback: Powershell Best Practice #13: Avoid double quotes in strings if not necessary | Powershell Guru

Leave a Reply

Your email address will not be published. Required fields are marked *