How can I get the OS version the hosts are running in vCenter ? I know esxcli is one way but that requires ssh into the host.
I went through this, this is only possible if there is a vm on that host. In case there are no vms present on the host we can't use this method to get the host version
Query the vCenter with the help of powercli (or maybe REST API)?
Regards,
Joerg
Not sure what you mean by that, both vCenter and ESXi have vSphere API endpoints that can be used to find the details you're looking for. It has nothing to do with whether ESXi host has VMs ... If you've got vCenter, then thats easiest and https://williamlam.com/2017/08/powercli-script-to-help-correlate-vcenter-esxi-vsan-buildversions-wo-... can also help