Hi
Has anybody an idea, how to get a "VC:HostSystem" object from a single ESXi host FQDN string?
Probably no rocket science, but (still as a rookie) I can't figure it out - and can't find anything as well. 🙁
Thanks in advance and regards
Roman
Addendum: Currently, I simply loop through an object with all ESXi hosts of the vCenter, until the name matches with the host I'm looking for. Maybe this is allready the best solution...?
var xpath = "xpath:matches(name, '(?i)" + hostFqdn + "')" //Case-insensitive match
var hosts = VcPlugin.getAllHostSystems(null, xpath);
return hosts[0];
var xpath = "xpath:matches(name, '(?i)" + hostFqdn + "')" //Case-insensitive match
var hosts = VcPlugin.getAllHostSystems(null, xpath);
return hosts[0];
Works very well!
Thanks a lot.
Thanks for taking the suggestion. Please marked it resolved if it works for you.