$success = Test-Connection -Ping -IPV4 -Count 4 -TimeoutSeconds 3 -TargetName $ip This code return the TestConnectionCommand+PingStatus while,
$success = Test-Connection -Ping -IPV4 -Count 4 -TimeoutSeconds 3 -TargetName $ip
$success