If you put the logic in an NSH script and execute that centrally it would work
So something like
and in the script
[ -f //$1/path to executable1 ] && nexec $1 "remote command" & exit
[ -f //$1/path to executable2 ] && nexec $1 "remote command" & exit
echo No HP server
Maybe I was being too hopeful to add a quantity of logic into an extended object without a script.
Actually scripting would also enable us to manipulate the output ready for an existing grammar file .