Reply to Message

View discussion in a popup

Replying to:
amarcy
Contributor
Contributor

Get-View Guest.Hostname property returning null

Can anyone tell me why this one liner only returns the VM name and not the Guest Host name?

Get-View -ViewType VirtualMachine -Property Name -Filter @{"Guest.HostName" = ".*$prompt.*"} | Select @{N='VM Name';E={$_.Name}}, @{N='Guest Host Name';E={$_.Guest.HostName}} | ft -wrap -auto

Thanks!

Reply
0 Kudos