我需要一行脚本来做这样的事情:
if (results from PowerShell command not empty) do something
PowerShell 命令基本上是
powershell -command "GetInstalledFoo"
我试过if (powershell -command "GetInstalledFoo" != "") echo "yes"
但得到错误-command was unexpected at this time.
这可能实现吗?该命令最终将作为cmd /k
.