Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Batch files for Powershell

$
0
0

If i have this in my batch file:

cd /d %~dp0
powershell.exe -File Build_01\sp_script.ps1

powershell.exe -File Build_02\sp_script.ps1
pause

How do I stop the execution of the batch if Build_01\sp_script.ps1 throws an error?


Viewing all articles
Browse latest Browse all 10624