Capture EXE output in PowerShell

前端 未结 5 2009
野趣味
野趣味 2020-12-09 02:40

A little background first.

I\'ve been tasked with encrypting files with a Powershell script using GPG (gnupg.org). The specific exe I\'m calling is simply gpg.exe. I

5条回答
  •  醉梦人生
    2020-12-09 03:05

    Also, PowerShell simply can't capture the output of some programs because they don't write to stdout. You can verify this by running the program in PowerShell ISE (it's in the version 2.0 CTP 3)

    If PowerShell ISE can't show the output in the graphical console, then you can't capture it either and may need some other way of automating the program.

提交回复
热议问题