$ 0 0 You can use that onyx code and use this to get your host id: $vmhostid = (get-vmhost $vmhost).extensiondata.Moref