Someone from the field asked me how to do this in a workflow. I am putting it here for everyone's benefit.
Here is the workflow code to list all the ESX hosts managed by a TPM server:
workflow ListAllESXhosts LocaleInsensitive var counter = 1 log info "List of all ESX host names" array esxHosts = DCMQ
uery (/pr oper ty[@ key= "pla tfor m.vi rtua liza tion .typ e" and @value like "VMware ESX" and @com pone ntId ="0" ]/Re sour ce[@ reso urce Type Id=" 8"]/ @sys temI d) foreach hostID in esxHosts do var hostName = DCMQ uery (/Ho stPl atfo rm[@ id=$ host ID]/ @nam e) log info counter + ": " + hostName counter = Jython[int(counter) + 1] done
Note: All information in this entry may
not be 100% accurate, though I
try to keep this most accurate as per my knowledge. Standard disclaimer