gpt4 book ai didi

powershell - 如何在Powershell中自动回答 “yes”提示?

转载 作者:行者123 更新时间:2023-12-03 09:35:21 25 4
gpt4 key购买 nike

如何在PowerShell session 中输入"is"作为交互式问题的答案?我知道,在Bash中,Yes是在提示符下回答"is"的工具。在我的情况下,我无法抑制提示。

我正在运行的脚本停止在

Please reply "yes" if you want to continue:



Powershell如何运行脚本,弹出时"is"?

最佳答案

使用ECHO对我有用。我在Powershell脚本中运行RSKeyMgmt.exe,它提示是(Y)/否(N)。所以当我这样做
ECHO Y | RSKeyMgmt.exe...
它没有提示问题,并且命令已正确执行。

因此,我认为ECHO 'someoption'也应适用于其他情况。

关于powershell - 如何在Powershell中自动回答 “yes”提示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14071012/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com