Thanks, LucD, for your replies.
I ultimately ended up with the following code to run through all hosts:
Get-VMHost | Sort-Object -Property Name | ForEach-Object { $esxcli = $null $esxcli = $_ | Get-EsxCli -ErrorAction SilentlyContinue If ($esxcli -ne $null) { $result = $esxcli.system.boot.device.get() If ($result.BootFilesystemUUID -ne '') { $_.Name + ' booted from disk (' + $result.BootFilesystemUUID + ')' } If ($result.BootNIC -ne '') { $_.Name + ' booted from the network (' + $result.BootNIC + ')' } } Else { $_.Name + ': Server unavailable' }
}