Hi,
does anyone have an explanation why this command does not return anything ? Thank you.
Get-View -ViewType ClusterComputeResource
Are there any clusters?
Does Get-Cluster return anything?
Are you connected to the correct vCenter?
What does $global:defaultVIServers return?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes any other commands work normally for example Get-VMHost returns results.
But not Get-Cluster, it's also return empty result. There are 2 clusters in our vSphere environment.
$global:defaultVIServers returns our vCenter.
Do you see any ClusterComputeResource entries when you do this?
$si = Get-View ServiceInstance
Get-View -SearchRoot $si.Content.RootFolder -ViewType ComputeResource |
Select Name,@{N='Type';E={$_.GetType().Name}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Sorry for the late reply, i was on vacation. Yes this command is working.
PS C:\Windows\system32> $si = Get-View ServiceInstance
PS C:\Windows\system32> Get-View -SearchRoot $si.Content.RootFolder -ViewType ComputeResource |
>> Select Name,@{N='Type';E={$_.GetType().Name}}
Name Type
---- ----
xxxx-1.loc ComputeResource
xxxx-2.loc ComputeResource
xxxx-3.loc ComputeResource
That looks as if there are only ESXi nodes in that vCenter, not Clusters
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference