[英]invoking an executable on powershell and then type commands
我正在嘗試如下調用可執行文件
.\test_use.exe
然后我按回車鍵得到一個像
"Enter a value between 1 and 5"
我輸入4並獲取一些詳細信息。 有沒有一種方法可以通過Powershell使其自動化。 我試圖通過
.\test_use.exe 4
但這行不通。 我也試過
$input = "4"
Invoke-command ".\test_use.exe" -InputObject $input
我收到以下錯誤
Invoke-command: Parameter cannot be resolved using the specified named characters
有人有指針嗎? 在批處理文件中執行此操作並將輸出存儲在文本文件中會更容易嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.