Can you provide the bottom half of the poll now window? LM appears to be looking for the text "Nutanix Guest Agent.ExitCode=X" and not finding it. The Output and ##WILDVALUE## section of the Poll Now data would help determine that. A common cause is not putting ##WILDVALUE## in the datapoint when using BatchScript. For example you likely want to have "##WILDVALUE##.ExitCode" for the ExitCode datapoint... But that wouldn't explain if this is sometimes working and sometimes not. Also perhaps you are hitting the limit of text that LM will parse in the output?
P.S. You can use groovy with BatchScript. BatchScript is really just how LM runs the process and how it interperates the output. But using PS here would likely be easier anyway.