If I run
get-datacenter | Get-VMHost | select Name, Parent
I get ouput like
Name Parent
---- ------
svr1.example.com Cluster 1
svr2.example.com Cluster 1
svr3.example.com Cluster 1
svr4.example.com host
This is because my layout is as follows
Datacentre 1
-Cluster 1
--svr1
--svr2
--svr3
-svr4
svr4 is a standalone system in that datacenter.
Running
get-datacenter | Get-VMHost | ?{ $_.Parent -eq "host" }
Returns nothing though I would expect it to return "svr4"
get-datacenter | Get-VMHost | ?{ $_.Parent -ne "host" }
Returns everything.
Any Ideas?
Thanks in advance