never-displayed
View discussion in a popup
Would this help.
$VM = get-view –viewtype VirtualMachine –filter @{“Name”=”[vmname]”}
Then
$VM.Summary.Runtime
Should contain the hostname.