Suppress console output in PowerShell

前端 未结 3 1195
悲哀的现实
悲哀的现实 2020-12-09 01:04

I have a call to GPG in the following way in a PowerShell script:

$key = & \'gpg\' --decrypt \"secret.gpg\" --quiet --no-verbose > $null
3条回答
  •  春和景丽
    2020-12-09 01:45

    It is a duplicate of this question, with an answer that contains a time measurement of the different methods.

    Conclusion: Use [void] or > $null.

提交回复
热议问题