You may be getting the result of the Powershell rather than the ping.
You may want to simply exec ping.
With Powershell you may have to create a script that captures the result of the
command and exits with the error indicator. If Powershell works similar to
Unix/Linux/Solaris etc. shells, yo
Z W wrote:
Hi
I have a Powershell script that contains the line "exit 2" when ping fails
From Ant, it's showing
_ping:
[echo] Inside _build_ping_alive module
[exec] Pinging host1 ...
[exec] success
[exec] Pinging host2 ...
[exec] error: 11010 occurred
[exec] LastE
Hi
I have a Powershell script that contains the line "exit 2" when ping fails
>From Ant, it's showing
_ping:
[echo] Inside _build_ping_alive module
[exec] Pinging host1 ...
[exec] success
[exec] Pinging host2 ...
[exec] error: 11010 occurred
[exec] LastExitCode: 0