我希望我的PowerShell脚本在我运行的任何命令失败时停止(例如set -e在bash中).我正在使用Powershell命令(New-Object System.Net.WebClient)和程序(.\setup.exe).
set -e
New-Object System.Net.WebClient
.\setup.exe
windows powershell
powershell ×1
windows ×1