Try like this
Get-Cluster|Get-ResourcePool|
Select @{N='Cluster';E={
$parent=Get-View-Id $_.ExtensionData.Parent
while($parent-isnot[VMware.Vim.ClusterComputeResource]){
$parent=Get-View-Id $parent.Parent
}
$parent.Name}},
Name
Try like this
Select @{N='Cluster';E={
$parent=Get-View-Id $_.ExtensionData.Parent
while($parent-isnot[VMware.Vim.ClusterComputeResource]){
$parent=Get-View-Id $parent.Parent
}
$parent.Name}},
Name