Suppress console output in PowerShell February 1, 2023 by Tarik Try redirecting the output to Out-Null. Like so: $key = & 'gpg' --decrypt "secret.gpg" --quiet --no-verbose | out-null